Age | Commit message (Collapse) | Author |
|
Fix potential infinite loops by checking the return code of
nl_send_auto_complete; if nl_send_auto_complete fails pending
will always have the value 1 as the finish callback will not
be called resulting into an infinite loop
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
An upstream router may address solicits to the global address of the target,
these will not be answered by the kernel and not routed either due to link-local
source. The NS will eventually be retried as multicast, but we want to avoid this.
see also https://forum.archive.openwrt.org/viewtopic.php?id=40871
Signed-off-by: Stefan Alfers <sfan5@live.de>
|
|
Rework logic to refresh IPv4 addresses so we can get rid of the
second for loop
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Rework logic to refresh IPv6 addresses so we can get rid of the
second for loop
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Keep the valid and preferred lifetimes in sync with the kernel by always
updating the cached IPv6 addresses in refesh_iface_addr6().
This fixes invalid preferred and valid IA lifetimes in DHCPv6 reply
messages due to the cached preferred and valid lifetimes not being in
sync with the preferred and valid kernel lifetimes
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Commit a54cee0 introduced a regression in the handling of netlink neighbor
events as it did not set the interface pointer in the netevent_handler_info
struct resulting into a breakage of ndp relay mode
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Multiple logical OpenWrt interfaces can be stacked on top of the same
Linux device. As such netlink events for addresses/routes/ifindex changes
need to be propagated to the different logical OpenWrt interfaces
which use the Linux device as reported in the netlink message.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Use the logical OpenWrt interface name in syslog printing as multiple
logical interfaces can be defined on top of the same device
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Generate a NETEV_ADDR6LIST_CHANGE event in case the preferred lifetime
makes a transition from deprecated (preferred lifetime not greater than
current timestamp) to not deprecated (preferred lifetime greater than
current timestamp)
Reported-by: Tian Hao <haotia@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Fix incorrect sizeof arguments detetced by Coverity in CID 1430866 and
CID 1430893
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
Saves a few bytes.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
Rework the handling of netlink events by letting the different
modules ndp, ra, dhcpv6 and dhcpv4 install netevent handlers.
The installed netevent handlers are called by the netlink logic
passing an event indication together with event data.
Each netevent handler implements its own event logic; this
makes the code more modular and less complex by moving all
netlink code to netlink.c
While at it rename ia_addr and ia_addr_len into addr6 and
addr6_len respectively
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|
|
First step in moving netlink code to netlink.c by
moving netlink code from odhcpd.c to netlink.c
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
|