81 Commits

Author SHA1 Message Date
John Sharratt
aaaed4fce9 Added debug information that informs the autowire mode when creating a session 2017-07-02 00:11:24 +02:00
John Sharratt
8ed35f841f Put in the skeleton around the auto wiring functionality 2017-07-02 00:11:22 +02:00
Daniel Adolfsson
ca91245d3f Merge pull request #28 from meeuw/master
Add a systemd service file
2017-05-17 12:24:57 +02:00
Dick Marinus
f37e8eb33d Add a systemd service file 2017-05-17 07:36:52 +02:00
Daniel Adolfsson
eec9657b28 Merge pull request #23 from FRuffy/master
Fix makefile, switch ${OBS} and ${LIBS}.
2017-05-16 23:11:09 +02:00
Daniel Adolfsson
b30b654871 Add support for XSI-compliant strerror_r 2017-05-08 12:47:20 +02:00
Daniel Adolfsson
8a8f7b065c Fix compilation problems and issue #20
- Netlink is disabled per default (compile with WITH_ND_NETLINK)

- Automatic loading of routes is only done if at least one rule
  uses the "auto" setting.
2017-05-08 12:31:13 +02:00
FRuffy
3caf569a1f Fix makefile, switch ${OBS} and ${LIBS}. 2017-04-10 19:56:19 -07:00
Daniel Adolfsson
ce3815d954 Merge pull request #18 from alliedtelesis/master
Support DAD replies
2016-11-07 11:08:16 +01:00
Jason Rippon
ab7b2aa3bb Add functionality to reply to NS packets which are destined for a proxied interface.
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>
2016-10-27 17:22:23 +13:00
Carl Smith
a35def5b52 Make nd-proxy handle the interface being shutdown gracefully
Signed-off-by: Scott Parlane <scott.parlane@alliedtelesis.co.nz>
2016-10-19 11:41:30 +13:00
Carl Smith
df16c053b0 New nd-proxy for RS/RA proxying
Signed-off-by: Blair Steven <blair.steven@alliedtelesis.co.nz>
2016-09-22 16:06:38 +12:00
Blair Steven
cf244c10f7 Send proxied NA to the correct destination address
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>
2016-09-21 15:09:36 +12:00
Isaac Lee
8afd356df3 ND proxy support for dynamic interfaces
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>
2016-09-21 15:09:14 +12:00
Daniel Adolfsson
771f9ca29d Various changes (referencing issue #6);
- Fix a bug where re-reading routes would close the interfaces

- Allow unicast solicitation messages (experimental)
2016-05-17 08:55:06 +02:00
Daniel Adolfsson
9709759270 Remove the default rule behavior 'static', this must now be specified.
Bump version to 0.2.5
0.2.5
2016-04-18 19:14:27 +02:00
Daniel Adolfsson
9499745013 Add cerrno include to logger.cc 2016-04-18 18:45:43 +02:00
Daniel Adolfsson
cb23cdbeac Defer the configuration until after daemonized 2016-04-18 15:49:02 +02:00
Daniel Adolfsson
96ab05dade When daemonizing, change umask to 0 and change working directory to /.
Patch provided by Tim Bruylants (https://github.com/tbr)
2016-04-18 09:37:56 +02:00
Daniel Adolfsson
e49b71c0b7 Add some additional logging to allmulti() 2016-04-18 09:32:03 +02:00
Daniel Adolfsson
f19fa4be6a Fix a cast so it can be compiled with gcc-6 2016-04-08 13:32:22 +02:00
Daniel Adolfsson
b8b2d401b9 Preparation for 0.2.4 0.2.4 2015-10-13 15:25:22 +04:00
Daniel Adolfsson
4a837c511c Update README with the correct sample conf
It is "ndppd.conf-dist", not "ndppd.conf.example"
2015-10-11 03:11:19 +04:00
Daniel Adolfsson
e6f2e0a52e Update Website/Git URIs 2015-10-11 02:53:00 +04:00
Daniel Adolfsson
baec0bf028 Merge pull request #8 from nirgal/patch-1
Use standard C pre-processor flags from environement
2015-10-11 02:49:41 +04:00
nirgal
87f989026d Use standard C pre-processor flags in environement
This allows build environment to set standard C pre-processor "CPPFLAGS".
2015-10-09 11:36:03 +02:00
Daniel Adolfsson
e2e44ec5ed Merge pull request #5 from szatam/master
In order to get the correct pid, we should daemonize before writing the ...
2015-01-28 16:45:48 +04:00
Tamas Szabo
6b08f63fff In order to get the correct pid, we should daemonize before writing the pidfile 2014-12-19 11:44:10 +02:00
Daniel Adolfsson
00da8bf7ba Fix issue #2 - ndppd dæmonizes too early 2013-02-12 13:26:27 +01:00
Daniel Adolfsson
24aeceb060 Release 0.2.3 0.2.3 2012-09-21 13:13:15 +00:00
Jiri Kosina
fe5fe8e894 ndppd: remove unused variables
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Daniel Adolfsson <daniel@priv.nu>
2012-03-08 00:25:47 +01:00
Jiri Kosina
8ee4758b41 ndppd: fix initialization list ordering in constructors
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>
2012-03-08 00:25:45 +01:00
Jiri Bohac
e827641e40 ndppd: fix setting the ALLMULTI flag
ifa->allmulti() uses ifa->fd before it is initialized.

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: Daniel Adolfsson <daniel@priv.nu>
2012-03-08 00:20:25 +01:00
Daniel Adolfsson
b3e45caf20 Fix a problem with iface::cleanup() where 'it' was incremented improperly 0.2.2 2012-02-07 22:28:53 +01:00
Daniel Adolfsson
0dbc3e288a A couple of bugfixes
* 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.
2012-02-07 21:33:41 +01:00
Daniel Adolfsson
13b81fdd97 Last major commit for version 0.2.2
* 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
2012-02-07 12:44:55 +01:00
Daniel Adolfsson
d51acba693 Fix a uClibc++ compatibility issue using stringstream::rdbuf() 2012-02-04 13:43:39 +01:00
Daniel Adolfsson
3ba2e7797b Some more fixes related to ptr/weak_ptr 2012-02-04 11:02:49 +01:00
Daniel Adolfsson
244341b5cf Fix a couple of issues related to circular referencing (ptr/weak_ptr) 2012-02-04 09:41:41 +01:00
Daniel Adolfsson
804800864a Fix minor memory leak and logging 2012-02-04 00:23:11 +01:00
Daniel Adolfsson
997499ec2b Update documentation for 0.2.2 and fix logging 2012-02-03 23:13:46 +01:00
Daniel Adolfsson
7956724a8e Fix a couple of memory leaks 2012-02-03 22:25:00 +01:00
Daniel Adolfsson
6723f2f4b6 Several large changes for the upcoming 0.2.2 version
- 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.
2012-02-03 14:29:37 +01:00
Daniel Adolfsson
ab0ebe09ff Go back to using own implementation of smart pointers 2012-02-02 20:35:09 +01:00
Daniel Adolfsson
ffb4e6d398 New configuration implementation
First step in removing the libconfuse dependency.
2012-01-31 23:53:45 +01:00
Daniel Adolfsson
c8cc80925a New logging implementation
-  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.
2012-01-31 20:25:39 +01:00
Daniel Adolfsson
bc70f587ef Refactor source
- Change coding style

- Switch from own implementation of smart pointers to std::smart_ptr
  and std::weak_ptr
2012-01-28 20:28:07 +01:00
Daniel Adolfsson
6fda405a59 Add required #include when compiling for OpenWrt 0.2.1 2012-01-26 11:38:54 +01:00
Daniel Adolfsson
d78bee25a7 Updated author's e-mail address 2012-01-26 11:21:07 +01:00
Daniel Adolfsson
d1a4c3eb77 Add ChangeLog 2011-10-11 09:24:47 +02:00