We need to send the NA back to the All Nodes Multicast address
rather than attempting to route to "::".
Signed-off-by: Scott Parlane <scott.parlane@alliedtelesis.co.nz>
Dynamic interfaces, such as tunnel and ppp, do not exist
in the kernel until it's fully configured. If nd proxy
is configured on such an interface, the ndppd config for
this interface should be written only when the interface's
fully configured (ie, having a valid ifindex value in apteryx).
The patch ensures that the ndppd config only contains interfaces
that have a valid ifindex. This is done by watching the interface
ifindex node in apteryx and trigger the ndppd config update callback
when ifindex has changed.
To make ndppd not exit when the config file contains an interface
that is not yet created, ndppd is patched to treat fd-bind error
as a valid return code so that the program does not try to
proxy the interface and will continue to run.
Signed-off-by: Scott Parlane <scott.parlane@alliedtelesis.co.nz>
Members are initialized in the order that they are declared in the class
definition not in the order they are written them in the initialization
list in the constructor. Fix the ordering.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Daniel Adolfsson <daniel@priv.nu>
* Fix a bug where pollfds would be changed while in the poll_all
loop. This issue didn't exist before 'auto' was implemented.
* Fix so 'auto' rules won't try to forward Neighbor Solicitation
Packages through proxy's interface.
* Some code cleanup.
* Fix so that "route-ttl" in ndppd.conf works
* Fix a typo in ndppd.conf.5
* Update "ndppd.conf" to reflect the big changes
* Fix a bug with config loader
* Fix so that "auto" will never forward a Neighbor Solicitation
Message out through the "proxy" interface
- Bugfixes.
- New 'auto' configuration to be used in a 'rule' section. When using
this option, the routing table /proc/net/ipv6_route will be used to
auto-detect which interface to use when forwarding solicitation messages.
- New 'route' class to resolve which interface to query when using
'auto' configuration.
- Cleaned up the code some more.
- Switch from the old 'log' class (ERR/DBG/etc) to a better
'logger' class. Also use LOG_* as defined in syslog.h.
- Make it possible to read debug messages even for release.
- Add a new argument (-v|--verbose) to 'ndppd' to change
verbosity level.
- 'ttl' to control how long a session will stay in the cache once the
session becomes valid or invalid. Default is 30 seconds.
- 'timeout' to control how long a session will wait for a Neighbor
Advertisement before being invalidated. Default is 500 ms.
* Change Makefile so release is the default mode, use DEBUG=1 to turn
on debugging.
* Clean up 'conf' a bit.
* Add a new option 'router' (valid in 'proxy' section) to turn on/off
the ND_NA_FLAG_ROUTER flag for adverts.
* Make iface::read() return a bit more generic address (sockaddr).
* Add is_unicast() and is_multicast() to address.
* Set default config path to "/etc/ndppd.conf".
* Silently ignore solicit messages with bad saddr and/or daddr.
* Add '-d' to "daemonize". Will also enable syslogging.
* Fix a couple of bugs in 'session'.
* Clean up 'log', and use LOG_* macros instead.
* Add syslog(bool) to 'log' to enable/disable the use of syslog.
- Clean up some junk code that was left over.
- Replace ptr<> with strong_ptr<> and weak_ptr<> to easier distinguish
between weak and strong pointers.
- Fix a couple of bugs.