#
7fa59e67 |
| 06-Jan-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r311460 through r311545.
|
#
cc5bb78b |
| 06-Jan-2017 |
Sepherosa Ziehau <sephe@FreeBSD.org> |
if: Defer the if_up until the ifnet.if_ioctl is called.
This ensures the interface is initialized by the interface driver before it can be used by the rest of the system.
Reviewed by: jhb, karels,
if: Defer the if_up until the ifnet.if_ioctl is called.
This ensures the interface is initialized by the interface driver before it can be used by the rest of the system.
Reviewed by: jhb, karels, gnn MFC after: 3 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8905
show more ...
|
#
a0e610c4 |
| 16-Oct-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r306906 through r307382.
|
#
368bf0c2 |
| 12-Oct-2016 |
Sepherosa Ziehau <sephe@FreeBSD.org> |
ifnet: Use if_link_state snapshot to invoke ifnet_link_event
So that everyone in this task have consistent view of link state.
Reviewed by: ae MFC after: 1 week Sponsored by: Microsoft Differential
ifnet: Use if_link_state snapshot to invoke ifnet_link_event
So that everyone in this task have consistent view of link state.
Reviewed by: ae MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8214
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
27067774 |
| 16-Aug-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r303250 through r304235.
|
#
32e0ade6 |
| 24-Jul-2016 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Partially revert r257696/r257713, which have an issue with writing to user controlled address. Restore the old code that emulated OSIOCGIFCONF in if.c.
Noticed by: C Turt
|
#
a29c7aeb |
| 29-Jun-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Several device drivers call if_alloc() and then do further checks and will cal if_free() in case of conflict, error, .. if_free() however sets the VNET instance from the ifp->if_vnet which was not ye
Several device drivers call if_alloc() and then do further checks and will cal if_free() in case of conflict, error, .. if_free() however sets the VNET instance from the ifp->if_vnet which was not yet initialized but would only in if_attach(). Fix this by setting the curvnet from where we allocate the interface in if_alloc(). if_attach() will later overwrite this as needed. We do not set the home_vnet early on as we only want to prevent the if_free() panic but not change any of the other housekeeping, e.g., triggered through ifioctl()s.
Reviewed by: brooks Approved by: re (gjb) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7010
show more ...
|
#
d3f6f80f |
| 22-Jun-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
After r302054 unloading an network interface driver on a kernel without VIMAGE support would dereference a NULL point unconditionally leading to a panic. Wrap the entire VIMAGE related code with #if
After r302054 unloading an network interface driver on a kernel without VIMAGE support would dereference a NULL point unconditionally leading to a panic. Wrap the entire VIMAGE related code with #ifdefs rather than just the decision making part to save an extra bit of resources.
Reported by: np Sponsored by: The FreeBSD Foundation MFC After: 13 days Approved by: re (marius)
show more ...
|
#
89856f7e |
| 21-Jun-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Get closer to a VIMAGE network stack teardown from top to bottom rather than removing the network interfaces first. This change is rather larger and convoluted as the ordering requirements cannot be
Get closer to a VIMAGE network stack teardown from top to bottom rather than removing the network interfaces first. This change is rather larger and convoluted as the ordering requirements cannot be separated.
Move the pfil(9) framework to SI_SUB_PROTO_PFIL, move Firewalls and related modules to their own SI_SUB_PROTO_FIREWALL. Move initialization of "physical" interfaces to SI_SUB_DRIVERS, move virtual (cloned) interfaces to SI_SUB_PSEUDO. Move Multicast to SI_SUB_PROTO_MC.
Re-work parts of multicast initialisation and teardown, not taking the huge amount of memory into account if used as a module yet.
For interface teardown we try to do as many of them as we can on SI_SUB_INIT_IF, but for some this makes no sense, e.g., when tunnelling over a higher layer protocol such as IP. In that case the interface has to go along (or before) the higher layer protocol is shutdown.
Kernel hhooks need to go last on teardown as they may be used at various higher layers and we cannot remove them before we cleaned up the higher layers.
For interface teardown there are multiple paths: (a) a cloned interface is destroyed (inside a VIMAGE or in the base system), (b) any interface is moved from a virtual network stack to a different network stack ("vmove"), or (c) a virtual network stack is being shut down. All code paths go through if_detach_internal() where we, depending on the vmove flag or the vnet state, make a decision on how much to shut down; in case we are destroying a VNET the individual protocol layers will cleanup their own parts thus we cannot do so again for each interface as we end up with, e.g., double-frees, destroying locks twice or acquiring already destroyed locks. When calling into protocol cleanups we equally have to tell them whether they need to detach upper layer protocols ("ulp") or not (e.g., in6_ifdetach()).
Provide or enahnce helper functions to do proper cleanup at a protocol rather than at an interface level.
Approved by: re (hrs) Obtained from: projects/vnet Reviewed by: gnn, jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6747
show more ...
|
#
2d5ad99a |
| 07-Jun-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
After tearing down the interface per-"domain" bits, set the data area to NULL to avoid it being mis-treated on a possible re-attach but also to get a clean NULL pointer derefence in case of errors du
After tearing down the interface per-"domain" bits, set the data area to NULL to avoid it being mis-treated on a possible re-attach but also to get a clean NULL pointer derefence in case of errors due to unexpected race conditions elsewhere in the code, e.g., callouts.
Obtained from: projects/vnet MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
show more ...
|
#
d117fd80 |
| 06-Jun-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Similarly to r301505 protect the removal of the ifa from the if_addrhead by a lock (as well as the check that the list is not empty).
Obtained from: projects/vnet MFC after: 2 weeks Sponsored by: Th
Similarly to r301505 protect the removal of the ifa from the if_addrhead by a lock (as well as the check that the list is not empty).
Obtained from: projects/vnet MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
show more ...
|
#
f22d78c0 |
| 06-Jun-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
In if_purgeaddrs() we cannot hold the lock over the entire loop due to called functions (as in other parts of the stack, leave a comment). Put around a lock the removal of the ifa from the list howev
In if_purgeaddrs() we cannot hold the lock over the entire loop due to called functions (as in other parts of the stack, leave a comment). Put around a lock the removal of the ifa from the list however to reduce the possible race with other places.
Obtained from: projects/vnet MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
show more ...
|
#
c169d9fe |
| 28-May-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
In if_attachdomain1() there does not seem to be any reason to use TRYLOCK rather than just acquire the lock, so just do that.
Reviewed by: markj Obtained from: projects/vnet MFC after: 2 weeks Sp
In if_attachdomain1() there does not seem to be any reason to use TRYLOCK rather than just acquire the lock, so just do that.
Reviewed by: markj Obtained from: projects/vnet MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6578
show more ...
|
#
dbd2ee46 |
| 25-May-2016 |
Nick Hibma <n_hibma@FreeBSD.org> |
Change net.link.log_promisc_mode_change to a read-only tunable
PR: 166255 Submitted by: eugen.grosbein.net Obtained from: hselasky MFC after: 3 days
|
#
ad4e9116 |
| 18-May-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Rather than having the if_vmove() code intermixed in the vnet_destroy() function in vnet.c move it to if.c where it logically belongs and put it under a VNET_SYSUNINIT() call. To not change the curre
Rather than having the if_vmove() code intermixed in the vnet_destroy() function in vnet.c move it to if.c where it logically belongs and put it under a VNET_SYSUNINIT() call. To not change the current behaviour make sure it runs first thing during teardown. In the future this will allow us more flexibility on changing the order on when we want to get rid of interfaces.
Stop exporting if_vmove() and make it file static.
Reviewed by: gnn Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6438
show more ...
|
#
4c7070db |
| 18-May-2016 |
Scott Long <scottl@FreeBSD.org> |
Import the 'iflib' API library for network drivers. From the author:
"iflib is a library to eliminate the need for frequently duplicated device independent logic propagated (poorly) across many net
Import the 'iflib' API library for network drivers. From the author:
"iflib is a library to eliminate the need for frequently duplicated device independent logic propagated (poorly) across many network drivers."
Participation is purely optional. The IFLIB kernel config option is provided for drivers that want to transition between legacy and iflib modes of operation. ixl and ixgbe driver conversions will be committed shortly. We hope to see participation from the Broadcom and maybe Chelsio drivers in the near future.
Submitted by: mmacy@nextbsd.org Reviewed by: gallatin Differential Revision: D5211
show more ...
|
#
1ef3d54d |
| 15-May-2016 |
Don Lewis <truckman@FreeBSD.org> |
When handling SIOCSIFNAME ensure that the new interface name is NUL terminated. Reject the rename attempt if the name is too long.
MFC after: 1 week
|
#
6d07c157 |
| 12-May-2016 |
Nick Hibma <n_hibma@FreeBSD.org> |
Allow silencing of 'promiscuous mode enabled/disabled' messages.
PR: 166255 Submitted by: eugen.grosbein.net Obtained from: eugen.grosbein.net MFC after: 1 week
|
#
a4641f4e |
| 03-May-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/net*: minor spelling fixes.
No functional change.
|
#
0edd2576 |
| 16-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
155d72c4 |
| 15-Apr-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/net* : for pointers replace 0 with NULL.
Mostly cosmetical, no functional change.
Found with devel/coccinelle.
|
#
876d357f |
| 11-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
05fc4164 |
| 11-Apr-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
During if_vmove() we call if_detach_internal() which in turn calls the event handler notifying about interface departure and one of the consumers will detach if_bpf. There is no way for us to re-atta
During if_vmove() we call if_detach_internal() which in turn calls the event handler notifying about interface departure and one of the consumers will detach if_bpf. There is no way for us to re-attach this easily as the DLT and hdrlen are only given on interface creation. Add a function to allow us to query the DLT and hdrlen from a current BPF attachment and after if_attach_internal() manually re-add the if_bpf attachment using these values.
Found by panics triggered by nd6 packets running past BPF_MTAP() with no proper if_bpf pointer on the interface.
Also add a basic DDB show function to investigate the if_bpf attachment of an interface.
Reviewed by: gnn MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5896
show more ...
|
Revision tags: release/10.3.0 |
|
#
009e81b1 |
| 22-Jan-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
MFH @r294567
|
#
1f12da0e |
| 22-Jan-2016 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Just checkpoint the WIP in order to be able to make the tree update easier. Note: this is currently not in a usable state as certain teardown parts are not called and the DOMAIN rework is missing.
Just checkpoint the WIP in order to be able to make the tree update easier. Note: this is currently not in a usable state as certain teardown parts are not called and the DOMAIN rework is missing. More to come soon and find its way to head.
Obtained from: P4 //depot/user/bz/vimage/... Sponsored by: The FreeBSD Foundation
show more ...
|