summaryrefslogtreecommitdiffhomepage
path: root/src/netlink.c
AgeCommit message (Collapse)Author
2019-10-01netlink: fix potential infinite loopsHans Dedecker
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>
2019-09-15netlink: rename netlink callback handlersHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2019-09-15ndp: answer global-addressed NS manuallysfan5
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>
2019-03-29netlink: rework IPv4 address refresh logicHans Dedecker
Rework logic to refresh IPv4 addresses so we can get rid of the second for loop Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2019-03-29netlink: rework IPv6 address refresh logicHans Dedecker
Rework logic to refresh IPv6 addresses so we can get rid of the second for loop Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2019-03-27netlink: fix IPv6 address updates (FS#2204)Hans Dedecker
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>
2019-03-21netlink: fix neighbor event handling (FS#2160)Hans Dedecker
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>
2019-02-07netlink: rework handling of netlink messagesHans Dedecker
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>
2019-02-03treewide: align syslog tracingHans Dedecker
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>
2018-11-27netlink: fix triggering of NETEV_ADDR6LIST_CHANGE eventHans Dedecker
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>
2018-05-28treewide: switch to C-code style commentsHans Dedecker
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2018-05-26netlink: fix incorrect sizeof argumentHans Dedecker
Fix incorrect sizeof arguments detetced by Coverity in CID 1430866 and CID 1430893 Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-12-17odhcpd: Replace strerror(errno) with %m formatRosen Penev
Saves a few bytes. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2017-11-09treewide: rework handling of netlink eventsHans Dedecker
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>
2017-10-16treewide: add netlink fileHans Dedecker
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>