]> git.ozlabs.org Git - ppp.git/commitdiff
pppd: Set local and remote IPv6 addresses by one call
authorPali Rohár <pali@kernel.org>
Sun, 10 Jan 2021 18:46:07 +0000 (19:46 +0100)
committerPali Rohár <pali@kernel.org>
Mon, 15 Feb 2021 22:37:32 +0000 (23:37 +0100)
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 <pali@kernel.org>

No differences found