Uses netlink sockets to learn the addresses on the proxied
interfaces so that NS packets can be replied to (with a NA)
when the address is present.
Signed-off-by: Carl Smith <carl.smith@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>
* 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.
* 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.