freebsd-dev/sbin/ifconfig
Alexander V. Chernikov 6d204407ec ifconfig: fix ifconfig IFX inet[6] ADDR -alias
Internally, inet and inet6 family handlers store state for
 address addition and deletion separately, as, for example,
 "ifconfig lo0 inet 127.0.0.2/32" triggers a) deletion of the
 first interface address and b) addition of a new one.
The current logic behind handling "-alias" being the last argument
 is to copy the address from "addition" state to the "deletion"
 state. It is done by the generic ifconfig code, which explicitly
 typecasts opaque handler state pointers to "struct ifreq", which
 doesn't work in the Netlink case.

Fix this by introducing family-specific "af_copyaddr" handler,
 which removes the peeking & typecasting logic from the generic code.

Reported by:	otis
Tested by:	otis
2023-05-25 15:03:35 +00:00
..
tests
af_inet6.c ifconfig: fix ifconfig IFX inet[6] ADDR -alias 2023-05-25 15:03:35 +00:00
af_inet.c ifconfig: fix ifconfig IFX inet[6] ADDR -alias 2023-05-25 15:03:35 +00:00
af_link.c ifconfig: switch IPv4/IPv6 address manipulations to Netlink. 2023-05-25 12:22:18 +00:00
af_nd6.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
carp.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifbridge.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifclone.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifconfig_netlink.c ifconfig: switch IPv4/IPv6 address manipulations to Netlink. 2023-05-25 12:22:18 +00:00
ifconfig_netlink.h ifconfig: make interface and address listing use Netlink as transport 2023-05-16 19:39:13 +00:00
ifconfig.8 ifconfig(8): Teach ifconfig to attach and run itself in a jail 2023-05-23 16:39:22 -04:00
ifconfig.c ifconfig: fix ifconfig IFX inet[6] ADDR -alias 2023-05-25 15:03:35 +00:00
ifconfig.h ifconfig: fix ifconfig IFX inet[6] ADDR -alias 2023-05-25 15:03:35 +00:00
iffib.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifgif.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifgre.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifgroup.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifieee80211.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifipsec.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
iflagg.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifmac.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifmedia.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifpfsync.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifstf.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifvlan.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
ifvxlan.c ifconfig: introduce ifconfig_context to store current global state. 2023-05-24 10:40:34 +00:00
Makefile ifconfig: make interface and address listing use Netlink as transport 2023-05-16 19:39:13 +00:00
Makefile.depend Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
sfp.c sbin/ifconfig: Use a global libifconfig handle 2021-03-02 21:15:40 -05:00