From: Pali Rohár Date: Sun, 10 Jan 2021 18:46:07 +0000 (+0100) Subject: pppd: Set local and remote IPv6 addresses by one call X-Git-Tag: ppp-2.5.0~85^2~1 X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=44404e38ed984b12df453bf39c3a39dd0d336d23;hp=44404e38ed984b12df453bf39c3a39dd0d336d23;p=ppp.git pppd: Set local and remote IPv6 addresses by one call Currently local IPv6 address is set by SIOCSIFADDR ioctl and remote peer address is appended by rtnetlink RTM_NEWADDR/NLM_F_REPLACE call. For RTM_NEWADDR/NLM_F_REPLACE call it is needed to specify both local + remote addresses as local address is used for matching to which address needs to be remote peer address appended. When issuing this call kernel first removes currently configured local address and then inserts a new pair of local + remote addresses. Simplify whole setup by just one rtnetlink RTM_NEWADDR/NLM_F_CREATE call by inserting pair of local + remote addresses atomically. Therefore calling SIOCSIFADDR ioctl for local IPv6 address is not used or needed anymore. Signed-off-by: Pali Rohár ---