Revision tags: release/14.0.0, release/13.2.0 |
|
#
bbf86c65 |
| 12-Mar-2023 |
Mark Johnston <markj@FreeBSD.org> |
netinet: Remove stale references to Giant from comments
MFC after: 1 week
|
#
c2e34045 |
| 13-Dec-2023 |
Kristof Provost <kp@FreeBSD.org> |
mcast: fix leaked igmp packets on multicast cleanup
When we release a multicast address (e.g. on interface shutdown) we may still have packets queued in inm_scq. We have to free those, or we'll leak
mcast: fix leaked igmp packets on multicast cleanup
When we release a multicast address (e.g. on interface shutdown) we may still have packets queued in inm_scq. We have to free those, or we'll leak memory.
Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43033
show more ...
|
#
c196e432 |
| 12-Dec-2023 |
Kristof Provost <kp@FreeBSD.org> |
Revert "mcast: fix memory leak in imf_purge()"
This reverts commit fa03d37432caf17d56a931a9e6f5d9b06f102c5b.
This commit caused us to not send IGMP leave messages if the inpcb went away. In other w
Revert "mcast: fix memory leak in imf_purge()"
This reverts commit fa03d37432caf17d56a931a9e6f5d9b06f102c5b.
This commit caused us to not send IGMP leave messages if the inpcb went away. In other words: we freed pending packets whenever the socket closed rather than when the interface (or address) goes away.
Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43032
show more ...
|
#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: 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.
Remov
sys: 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 ...
|
#
fa03d374 |
| 29-Aug-2023 |
Kristof Provost <kp@FreeBSD.org> |
mcast: fix memory leak in imf_purge()
The IGMP code buffers packets in the imf_inm->inm_scq mbufq, but does not clear this queue when struct in_mfilter is freed by imf_purge(). This can cause memory
mcast: fix memory leak in imf_purge()
The IGMP code buffers packets in the imf_inm->inm_scq mbufq, but does not clear this queue when struct in_mfilter is freed by imf_purge(). This can cause memory leaks if IGMPv3 is used.
Purge the mbufq on imf_purge().
MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D41629
show more ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
290f7f4a |
| 28-Feb-2023 |
Fidaullah Noonari <fidaullah.noonari@emumba.com> |
in_mcat.c: change multicast not member condition
If there is no source filter entry => block if that's SSM ("exclude" mode per RFC 3678 clause 3). If there is an entry => check its action & block i
in_mcat.c: change multicast not member condition
If there is no source filter entry => block if that's SSM ("exclude" mode per RFC 3678 clause 3). If there is an entry => check its action & block if the action is "exclude".
It would be nice if the test case in this PR were converted into an ATF test case, but not blocking on that.
Reviewed by: imp, melifaro Pull Request: https://github.com/freebsd/freebsd-src/pull/601
show more ...
|
#
3d0d5b21 |
| 23-Jan-2023 |
Justin Hibbits <jhibbits@FreeBSD.org> |
IfAPI: Explicitly include <net/if_private.h> in netstack
Summary: In preparation of making if_t completely opaque outside of the netstack, explicitly include the header. <net/if_var.h> will stop in
IfAPI: Explicitly include <net/if_private.h> in netstack
Summary: In preparation of making if_t completely opaque outside of the netstack, explicitly include the header. <net/if_var.h> will stop including the header in the future.
Sponsored by: Juniper Networks, Inc. Reviewed by: glebius, melifaro Differential Revision: https://reviews.freebsd.org/D38200
show more ...
|
Revision tags: release/12.4.0 |
|
#
1e9482f4 |
| 08-Oct-2022 |
Alexander Motin <mav@FreeBSD.org> |
inet: Simplify if_multiaddrs iteration.
Similar to 2cd6ad766eb23 for inet6 drop ifma_restart use, creating more problems than solving. It is no longer needed after epoch introduction.
While there,
inet: Simplify if_multiaddrs iteration.
Similar to 2cd6ad766eb23 for inet6 drop ifma_restart use, creating more problems than solving. It is no longer needed after epoch introduction.
While there, add NULL check for ifma_ifp in igmp_change_state(), that sometimes caused panics on interface destruction.
MFC after: 2 weeks
show more ...
|
#
8624f434 |
| 31-Aug-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
divert: declare PF_DIVERT domain and stop abusing PF_INET
The divert(4) is not a protocol of IPv4. It is a socket to intercept packets from ipfw(4) to userland and re-inject them back. It can dive
divert: declare PF_DIVERT domain and stop abusing PF_INET
The divert(4) is not a protocol of IPv4. It is a socket to intercept packets from ipfw(4) to userland and re-inject them back. It can divert and re-inject IPv4 and IPv6 packets today, but potentially it is not limited to these two protocols. The IPPROTO_DIVERT does not belong to known IP protocols, it doesn't even fit into u_char. I guess, the implementation of divert(4) was done the way it is done basically because it was easier to do it this way, back when protocols for sockets were intertwined with IP protocols and domains were statically compiled in.
Moving divert(4) out of inetsw accomplished two important things:
1) IPDIVERT is getting much closer to be not dependent on INET. This will be finalized in following changes. 2) Now divert socket no longer aliases with raw IPv4 socket. Domain/proto selection code won't need a hack for SOCK_RAW and multiple entries in inetsw implementing different flavors of raw socket can merge into one without requirement of raw IPv4 being the last member of dom_protosw.
Differential revision: https://reviews.freebsd.org/D36379
show more ...
|
Revision tags: release/13.1.0 |
|
#
d74b7bae |
| 04-Dec-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
ifnet_byindex() actually requires network epoch
Sweep over potentially unsafe calls to ifnet_byindex() and wrap them in epoch. Most of the code touched remains unsafe, as the returned pointer is be
ifnet_byindex() actually requires network epoch
Sweep over potentially unsafe calls to ifnet_byindex() and wrap them in epoch. Most of the code touched remains unsafe, as the returned pointer is being used after epoch exit. Mark that with a comment.
Validate the index argument inside the function, reducing argument validation requirement from the callers and making V_if_index private to if.c.
Reviewed by: melifaro Differential revision: https://reviews.freebsd.org/D33263
show more ...
|
Revision tags: release/12.3.0 |
|
#
c8ee75f2 |
| 10-Oct-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Use network epoch to protect local IPv4 addresses hash.
The modification to the hash are already naturally locked by in_control_sx. Convert the hash lists to CK lists. Remove the in_ifaddr_rmlock.
Use network epoch to protect local IPv4 addresses hash.
The modification to the hash are already naturally locked by in_control_sx. Convert the hash lists to CK lists. Remove the in_ifaddr_rmlock. Assert the network epoch where necessary.
Most cases when the hash lookup is done the epoch is already entered. Cover a few cases, that need entering the epoch, which mostly is initial configuration of tunnel interfaces and multicast addresses.
Reviewed by: melifaro Differential revision: https://reviews.freebsd.org/D32584
show more ...
|
#
9b7501e7 |
| 18-Oct-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
in_mcast: garbage collect inp_gcmoptions()
It is is used only once, merge it into inp_freemoptions().
|
#
2144431c |
| 08-Oct-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Remove in_ifaddr_lock acquisiton to access in_ifaddrhead.
An IPv4 address is embedded into an ifaddr which is freed via epoch. And the in_ifaddrhead is already a CK list. Use the network epoch to pr
Remove in_ifaddr_lock acquisiton to access in_ifaddrhead.
An IPv4 address is embedded into an ifaddr which is freed via epoch. And the in_ifaddrhead is already a CK list. Use the network epoch to protect against use after free.
Next step would be to CK-ify the in_addr hash and get rid of the...
Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D32434
show more ...
|
Revision tags: release/13.0.0 |
|
#
c3a456de |
| 05-Apr-2021 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Always use inp fib in the inp_lookup_mcast_ifp().
inp_lookup_mcast_ifp() is static and is only used in the inp_join_group(). The latter function is also static, and is only used in the inp_setmoptio
Always use inp fib in the inp_lookup_mcast_ifp().
inp_lookup_mcast_ifp() is static and is only used in the inp_join_group(). The latter function is also static, and is only used in the inp_setmoptions(), which relies on inp being non-NULL.
As a result, in the current code, inp_lookup_mcast_ifp() is always called with non-NULL inp. Eliminate unused RT_DEFAULT_FIB condition and always use inp fib instead.
Differential Revision: https://reviews.freebsd.org/D29594 Reviewed by: kp MFC after: 2 weeks
show more ...
|
#
f3245be3 |
| 23-Feb-2021 |
Kristof Provost <kp@FreeBSD.org> |
net: remove legacy in_addmulti()
Despite the comment to the contrary neither pf nor carp use in_addmulti(). Nothing does, so get rid of it.
Carp stopped using it in 08b68b0e4c6b132127919cfbaf7275c7
net: remove legacy in_addmulti()
Despite the comment to the contrary neither pf nor carp use in_addmulti(). Nothing does, so get rid of it.
Carp stopped using it in 08b68b0e4c6b132127919cfbaf7275c727ca7843 (2011). It's unclear when pf stopped using it, but before d6d3f01e0a3395c1fae34a3c4be7b051cb2d7581 (2012).
Reviewed by: bz@, melifaro@ Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28918
show more ...
|
Revision tags: release/12.2.0 |
|
#
fa8b3fcb |
| 18-Oct-2020 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Simplify NET_EPOCH_EXIT in inp_join_group().
Suggested by: kib
|
#
337418ad |
| 17-Oct-2020 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Fix sleepq_add panic happening with too wide net epoch in mcast control.
PR: 250413 Reported by: Christopher Hall <hsw at bitmark.com> Reviewed by: ae Differential Revision: https://reviews.freebsd
Fix sleepq_add panic happening with too wide net epoch in mcast control.
PR: 250413 Reported by: Christopher Hall <hsw at bitmark.com> Reviewed by: ae Differential Revision: https://reviews.freebsd.org/D26827
show more ...
|
#
662c1305 |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
net: clean up empty lines in .c and .h files
|
#
de6fc2e3 |
| 15-Aug-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r364082 through r364250.
|
#
440cec3f |
| 12-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
b453d3d2 |
| 11-Aug-2020 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Use a static initializer for the multicast free tasks. This makes the SYSINIT() function updated in r364072 superfluous.
Suggested by: glebius@ MFC after: 1 week Sponsored by: Mellanox Technologies
|
#
8460d754 |
| 10-Aug-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r364051 through r364081.
|
#
f9461246 |
| 10-Aug-2020 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
MC: add a note with reference to the discussion and history as-to why we are where we are now. The main thing is to try to get rid of the delayed freeing to avoid blocking on the taskq when shutting
MC: add a note with reference to the discussion and history as-to why we are where we are now. The main thing is to try to get rid of the delayed freeing to avoid blocking on the taskq when shutting down vnets.
X-Timeout: if you still see this before 14-RELEASE remove it.
show more ...
|
#
3689652c |
| 10-Aug-2020 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Make sure the multicast release tasks are properly drained when destroying a VNET or a network interface.
Else the inm release tasks, both IPv4 and IPv6 may cause a panic accessing a freed VNET or n
Make sure the multicast release tasks are properly drained when destroying a VNET or a network interface.
Else the inm release tasks, both IPv4 and IPv6 may cause a panic accessing a freed VNET or network interface.
Reviewed by: jmg@ Discussed with: bz@ Differential Revision: https://reviews.freebsd.org/D24914 MFC after: 1 week Sponsored by: Mellanox Technologies
show more ...
|