#
32e86a82 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remo
sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
cea9f49f |
| 05-Jul-2023 |
Mateusz Guzik <mjg@FreeBSD.org> |
ping: low-effort fix to make it compilable without inet
|
#
08992b20 |
| 19-Jun-2023 |
John Baldwin <jhb@FreeBSD.org> |
ifconfig: Avoid issues with trying to negate unsigned values.
The if_flags and if_cap fields hold a bitmask of flags. If a flag is the MSB of the field, then the logic in setifflags and setifcap wh
ifconfig: Avoid issues with trying to negate unsigned values.
The if_flags and if_cap fields hold a bitmask of flags. If a flag is the MSB of the field, then the logic in setifflags and setifcap which uses a < 0 check does the wrong thing (it tries to clear the flag rather than setting it). Also, trying to use -<FOO> doesn't actually work as the result is a nop. To fix, stop overloading setifcap and setifflags and instead add new dedicated action functions clearifcap and clearifflags for clearing a flag. The value passed in the argument to the command is now always the raw flag.
This was reported by a GCC warning after raising WARNS:
sbin/ifconfig/ifconfig.c:2061:33: error: integer overflow in expression '-2147483648' of type 'int' results in '-2147483648' [-Werror=overflow] 2061 | DEF_CMD("-txtlsrtlmt", -IFCAP_TXTLS_RTLMT, setifcap), | ^
Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40608
show more ...
|
#
7fa282e6 |
| 14-Jun-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
ifconfig: remove (most of) the usages of global 'struct ifreq ifr'.
It is hard to reason about the contents of 'ifr' at any given time as nearly every function sets random fields or pointers in this
ifconfig: remove (most of) the usages of global 'struct ifreq ifr'.
It is hard to reason about the contents of 'ifr' at any given time as nearly every function sets random fields or pointers in this structure. Use local on-stack clean 'struct ifreq' for each function instead.
Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D40534 MFC after: 2 weeks
show more ...
|
#
c6885dbd |
| 13-Jun-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
ifconfig: eliminate global 'verbose' and 'printkey' variables
Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D40427 MFC after: 2 weeks
|
#
74b42611 |
| 13-Jun-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
ifconfig: add if_ctx argument to the generic and ifclone callbacks.
This is the continuation of the ifconfig cleanup work. This change is a pre-requsite for the next changes removing some of the glo
ifconfig: add if_ctx argument to the generic and ifclone callbacks.
This is the continuation of the ifconfig cleanup work. This change is a pre-requsite for the next changes removing some of the global variables. It will also help in implementing functionality via Netlink instead of ioctl. No functional changes intended. * vxlan_cb() was removed as it contained no code * ioctl_ifcreate() was renamed to ifcreate_ioctl() to follow the other netlink/ioctl function naming. Netlink and ioctl provide _different_ interfaces and it's not possible to have a unified interface object that can be filled by either netlink or ioctl implementations. With that in mind, I'm leaning more to the function_<nl|ioctl> postfix pattern, than doing ioctl_ or netlink_ prefix.
Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D40426 MFC after: 2 weeks
show more ...
|
#
0c2beef7 |
| 01-Jun-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
ifconfig: fix warnings #2
Fix all -Wparameter-unused and cast alignment
Differential Revision: https://reviews.freebsd.org/D40303 MFC after: 2 weeks
|
#
6e3a9d7f |
| 23-May-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
ifconfig: introduce `ifconfig_context` to store current global state.
The structure consists of all current context - arguments, open sockets, current family and so on.
Pass this structure as a fir
ifconfig: introduce `ifconfig_context` to store current global state.
The structure consists of all current context - arguments, open sockets, current family and so on.
Pass this structure as a first argument to most of the af_ menthods. This allows to propagate and update shared data without using global variables.
The diff is pretty large, but de-facto mechanical. All changes except the structure setup in ifconfig[_netlink].c are one-line mechanical changes.
Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D40239 MFC after: 2 weeks
show more ...
|
#
44cd85d4 |
| 23-May-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
ifconfig: cleanup warnings #1
Cleanup compiler warnings in preparation to set Wextra and remove WARNS?=2
Differential Revision: https://reviews.freebsd.org/D40238 MFC after: 2 weeks
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0 |
|
#
05952067 |
| 26-Nov-2020 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Ensure consistent error messages from ifconfig(8).
If multiple threads are invoking "ifconfig XXX create" a race may occur which can lead to two different error messages for the same error.
a) ifco
Ensure consistent error messages from ifconfig(8).
If multiple threads are invoking "ifconfig XXX create" a race may occur which can lead to two different error messages for the same error.
a) ifconfig: SIOCIFCREATE2: File exists b) ifconfig: interface XXX already exists
This patch ensures ifconfig prints the same error code for the same case.
Reviewed by: imp@ and kib@ Differential Revision: https://reviews.freebsd.org/D27380 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking
show more ...
|
Revision tags: release/12.2.0 |
|
#
c7cffd65 |
| 21-Oct-2020 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Add support for stacked VLANs (IEEE 802.1ad, AKA Q-in-Q).
802.1ad interfaces are created with ifconfig using the "vlanproto" parameter. Eg., the following creates a 802.1Q VLAN (id #42) over a 802.1
Add support for stacked VLANs (IEEE 802.1ad, AKA Q-in-Q).
802.1ad interfaces are created with ifconfig using the "vlanproto" parameter. Eg., the following creates a 802.1Q VLAN (id #42) over a 802.1ad S-VLAN (id #5) over a physical Ethernet interface (em0).
ifconfig vlan5 create vlandev em0 vlan 5 vlanproto 802.1ad up ifconfig vlan42 create vlandev vlan5 vlan 42 inet 10.5.42.1/24
VLAN_MTU, VLAN_HWCSUM and VLAN_TSO capabilities should be properly supported. VLAN_HWTAGGING is only partially supported, as there is currently no IFCAP_VLAN_* denoting the possibility to set the VLAN EtherType to anything else than 0x8100 (802.1ad uses 0x88A8).
Submitted by: Olivier Piras Sponsored by: RG Nets Differential Revision: https://reviews.freebsd.org/D26436
show more ...
|
#
830edb45 |
| 18-Sep-2020 |
Navdeep Parhar <np@FreeBSD.org> |
Add two new ifnet capabilities for hw checksumming and TSO for VXLAN traffic.
These are similar to the existing VLAN capabilities.
Reviewed by: kib@ Sponsored by: Chelsio Communications Differentia
Add two new ifnet capabilities for hw checksumming and TSO for VXLAN traffic.
These are similar to the existing VLAN capabilities.
Reviewed by: kib@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25873
show more ...
|
Revision tags: release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
4b49587c |
| 06-Jan-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r327341 through r327623.
|
#
33e0d8f0 |
| 30-Dec-2017 |
Bryan Venteicher <bryanv@FreeBSD.org> |
Add support for IPv6 scoped addresses to vxlan
MFC after: 2 weeks
|
#
f53d9723 |
| 07-Dec-2017 |
Bryan Venteicher <bryanv@FreeBSD.org> |
Use consistent name for the vxlan VNI parameter name and provide shorthand
Submitted by: hrs MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D2868
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0 |
|
#
11d38a57 |
| 28-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
Sponsored by: Gandi.net
|
#
becbad1f |
| 13-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
65dcb5bc |
| 01-Oct-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r288197 through r288456.
|
#
5a2b666c |
| 01-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
0f405ee7 |
| 28-Sep-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Sync up with head (up to r288341).
|
#
abd71050 |
| 27-Sep-2015 |
Enji Cooper <ngie@FreeBSD.org> |
Replace N #defines with nitems to simplify ifconfig code slightly
MFC after: 1 week
|
Revision tags: release/10.2.0 |
|
#
416ba5c7 |
| 22-Jun-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with HEAD (r280229-r284686).
|
#
98e0ffae |
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
#
7757a1b4 |
| 03-May-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|