History log of /openbsd-current/sys/net/bridgectl.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.25 25-Feb-2021 dlg

we don't have to cast to caddr_t when calling m_copydata anymore.

the first cut of this diff was made with coccinelle using this spatch:

@rule@
type caddr_t;
expression m, off, len, cp;
@@
-m_copydata(m, off, len, (caddr_t)cp)
+m_copydata(m, off, len, cp)

i had fix it's opinionated idea of formatting by hand though, so
i'm not sure it was worth it.

ok deraadt@ bluhm@


# 1.24 24-Feb-2021 dlg

fix the length check on arp packets when handling arp filter rules.

another bridge feature i'm not convinced people actually use.

ok jmatthew@ claudio@


# 1.23 28-Jan-2021 mvs

bridge(4): convert ifunit() to if_unit(9)

ok bluhm@ sashan@


# 1.22 25-Jan-2021 mvs

We have this sequence in bridge(4) ioctl(2) path:

ifs = ifunit(req->ifbr_ifsname);
if (ifs == NULL) {
error = ENOENT;
break;
}
if (ifs->if_bridgeidx != ifp->if_index) {
error = ESRCH;
break;
}
bif = bridge_getbif(ifs);

This sequence repeats 8 times. Also we don't check value returned by
bridge_getbig() before use. Newly introduced bridge_getbig() function
replaces this sequence. This not only reduces duplicated code but also
makes `bif' dereference safe.

ok bluhm@


Revision tags: OPENBSD_6_8_BASE
# 1.21 24-Jun-2020 cheloha

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t. However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.

This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel. Similarly, time_uptime(9) is replaced
with getuptime(9).

There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.

There is no performance cost on 64-bit (__LP64__) platforms.

With input from visa@, dlg@, and tedu@.

Several bugs squashed by visa@.

ok kettenis@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.20 09-Jul-2019 mpi

Add missing mtx_leave() in error path.

Reported by kn@, ok visa@


# 1.19 12-May-2019 mpi

Switch the list of span interfaces and interfaces to SMR.

This removes the KERNEL_LOCK() around the list iteration in bridge_enqueue().

Since the NET_LOCK() isn't protecting any data structure, release it early
in all the code paths coming from the Network Stack to prevent possible
deadlock situations with smr_barrier().

bridge_input() is still KERNEL_LOCK()ed as well as bridge_filterrule().

ok visa@


# 1.18 28-Apr-2019 mpi

Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.

This redefines the ifp <-> bridge relationship. No lock can be
currently used across the multiples contexts where the bridge has
tentacles to protect a pointer, use an interface index.

Tested by various, ok dlg@, visa@


Revision tags: OPENBSD_6_5_BASE
# 1.17 08-Mar-2019 mpi

Move the tag mechanism outside of net/if_bridge.c.

This will help for future (un)locking.

ok visa@


# 1.16 20-Feb-2019 mpi

Protect the hash table with a mutex.

inputs & ok visa@


# 1.15 17-Feb-2019 mpi

Make bridge_rtupdate() return an error value instead of a pointer.


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.24 24-Feb-2021 dlg

fix the length check on arp packets when handling arp filter rules.

another bridge feature i'm not convinced people actually use.

ok jmatthew@ claudio@


# 1.23 28-Jan-2021 mvs

bridge(4): convert ifunit() to if_unit(9)

ok bluhm@ sashan@


# 1.22 25-Jan-2021 mvs

We have this sequence in bridge(4) ioctl(2) path:

ifs = ifunit(req->ifbr_ifsname);
if (ifs == NULL) {
error = ENOENT;
break;
}
if (ifs->if_bridgeidx != ifp->if_index) {
error = ESRCH;
break;
}
bif = bridge_getbif(ifs);

This sequence repeats 8 times. Also we don't check value returned by
bridge_getbig() before use. Newly introduced bridge_getbig() function
replaces this sequence. This not only reduces duplicated code but also
makes `bif' dereference safe.

ok bluhm@


Revision tags: OPENBSD_6_8_BASE
# 1.21 24-Jun-2020 cheloha

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t. However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.

This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel. Similarly, time_uptime(9) is replaced
with getuptime(9).

There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.

There is no performance cost on 64-bit (__LP64__) platforms.

With input from visa@, dlg@, and tedu@.

Several bugs squashed by visa@.

ok kettenis@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.20 09-Jul-2019 mpi

Add missing mtx_leave() in error path.

Reported by kn@, ok visa@


# 1.19 12-May-2019 mpi

Switch the list of span interfaces and interfaces to SMR.

This removes the KERNEL_LOCK() around the list iteration in bridge_enqueue().

Since the NET_LOCK() isn't protecting any data structure, release it early
in all the code paths coming from the Network Stack to prevent possible
deadlock situations with smr_barrier().

bridge_input() is still KERNEL_LOCK()ed as well as bridge_filterrule().

ok visa@


# 1.18 28-Apr-2019 mpi

Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.

This redefines the ifp <-> bridge relationship. No lock can be
currently used across the multiples contexts where the bridge has
tentacles to protect a pointer, use an interface index.

Tested by various, ok dlg@, visa@


Revision tags: OPENBSD_6_5_BASE
# 1.17 08-Mar-2019 mpi

Move the tag mechanism outside of net/if_bridge.c.

This will help for future (un)locking.

ok visa@


# 1.16 20-Feb-2019 mpi

Protect the hash table with a mutex.

inputs & ok visa@


# 1.15 17-Feb-2019 mpi

Make bridge_rtupdate() return an error value instead of a pointer.


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.23 28-Jan-2021 mvs

bridge(4): convert ifunit() to if_unit(9)

ok bluhm@ sashan@


# 1.22 25-Jan-2021 mvs

We have this sequence in bridge(4) ioctl(2) path:

ifs = ifunit(req->ifbr_ifsname);
if (ifs == NULL) {
error = ENOENT;
break;
}
if (ifs->if_bridgeidx != ifp->if_index) {
error = ESRCH;
break;
}
bif = bridge_getbif(ifs);

This sequence repeats 8 times. Also we don't check value returned by
bridge_getbig() before use. Newly introduced bridge_getbig() function
replaces this sequence. This not only reduces duplicated code but also
makes `bif' dereference safe.

ok bluhm@


Revision tags: OPENBSD_6_8_BASE
# 1.21 24-Jun-2020 cheloha

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t. However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.

This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel. Similarly, time_uptime(9) is replaced
with getuptime(9).

There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.

There is no performance cost on 64-bit (__LP64__) platforms.

With input from visa@, dlg@, and tedu@.

Several bugs squashed by visa@.

ok kettenis@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.20 09-Jul-2019 mpi

Add missing mtx_leave() in error path.

Reported by kn@, ok visa@


# 1.19 12-May-2019 mpi

Switch the list of span interfaces and interfaces to SMR.

This removes the KERNEL_LOCK() around the list iteration in bridge_enqueue().

Since the NET_LOCK() isn't protecting any data structure, release it early
in all the code paths coming from the Network Stack to prevent possible
deadlock situations with smr_barrier().

bridge_input() is still KERNEL_LOCK()ed as well as bridge_filterrule().

ok visa@


# 1.18 28-Apr-2019 mpi

Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.

This redefines the ifp <-> bridge relationship. No lock can be
currently used across the multiples contexts where the bridge has
tentacles to protect a pointer, use an interface index.

Tested by various, ok dlg@, visa@


Revision tags: OPENBSD_6_5_BASE
# 1.17 08-Mar-2019 mpi

Move the tag mechanism outside of net/if_bridge.c.

This will help for future (un)locking.

ok visa@


# 1.16 20-Feb-2019 mpi

Protect the hash table with a mutex.

inputs & ok visa@


# 1.15 17-Feb-2019 mpi

Make bridge_rtupdate() return an error value instead of a pointer.


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.22 25-Jan-2021 mvs

We have this sequence in bridge(4) ioctl(2) path:

ifs = ifunit(req->ifbr_ifsname);
if (ifs == NULL) {
error = ENOENT;
break;
}
if (ifs->if_bridgeidx != ifp->if_index) {
error = ESRCH;
break;
}
bif = bridge_getbif(ifs);

This sequence repeats 8 times. Also we don't check value returned by
bridge_getbig() before use. Newly introduced bridge_getbig() function
replaces this sequence. This not only reduces duplicated code but also
makes `bif' dereference safe.

ok bluhm@


Revision tags: OPENBSD_6_8_BASE
# 1.21 24-Jun-2020 cheloha

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t. However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.

This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel. Similarly, time_uptime(9) is replaced
with getuptime(9).

There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.

There is no performance cost on 64-bit (__LP64__) platforms.

With input from visa@, dlg@, and tedu@.

Several bugs squashed by visa@.

ok kettenis@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.20 09-Jul-2019 mpi

Add missing mtx_leave() in error path.

Reported by kn@, ok visa@


# 1.19 12-May-2019 mpi

Switch the list of span interfaces and interfaces to SMR.

This removes the KERNEL_LOCK() around the list iteration in bridge_enqueue().

Since the NET_LOCK() isn't protecting any data structure, release it early
in all the code paths coming from the Network Stack to prevent possible
deadlock situations with smr_barrier().

bridge_input() is still KERNEL_LOCK()ed as well as bridge_filterrule().

ok visa@


# 1.18 28-Apr-2019 mpi

Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.

This redefines the ifp <-> bridge relationship. No lock can be
currently used across the multiples contexts where the bridge has
tentacles to protect a pointer, use an interface index.

Tested by various, ok dlg@, visa@


Revision tags: OPENBSD_6_5_BASE
# 1.17 08-Mar-2019 mpi

Move the tag mechanism outside of net/if_bridge.c.

This will help for future (un)locking.

ok visa@


# 1.16 20-Feb-2019 mpi

Protect the hash table with a mutex.

inputs & ok visa@


# 1.15 17-Feb-2019 mpi

Make bridge_rtupdate() return an error value instead of a pointer.


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.21 24-Jun-2020 cheloha

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t. However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.

This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel. Similarly, time_uptime(9) is replaced
with getuptime(9).

There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.

There is no performance cost on 64-bit (__LP64__) platforms.

With input from visa@, dlg@, and tedu@.

Several bugs squashed by visa@.

ok kettenis@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.20 09-Jul-2019 mpi

Add missing mtx_leave() in error path.

Reported by kn@, ok visa@


# 1.19 12-May-2019 mpi

Switch the list of span interfaces and interfaces to SMR.

This removes the KERNEL_LOCK() around the list iteration in bridge_enqueue().

Since the NET_LOCK() isn't protecting any data structure, release it early
in all the code paths coming from the Network Stack to prevent possible
deadlock situations with smr_barrier().

bridge_input() is still KERNEL_LOCK()ed as well as bridge_filterrule().

ok visa@


# 1.18 28-Apr-2019 mpi

Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.

This redefines the ifp <-> bridge relationship. No lock can be
currently used across the multiples contexts where the bridge has
tentacles to protect a pointer, use an interface index.

Tested by various, ok dlg@, visa@


Revision tags: OPENBSD_6_5_BASE
# 1.17 08-Mar-2019 mpi

Move the tag mechanism outside of net/if_bridge.c.

This will help for future (un)locking.

ok visa@


# 1.16 20-Feb-2019 mpi

Protect the hash table with a mutex.

inputs & ok visa@


# 1.15 17-Feb-2019 mpi

Make bridge_rtupdate() return an error value instead of a pointer.


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.20 09-Jul-2019 mpi

Add missing mtx_leave() in error path.

Reported by kn@, ok visa@


# 1.19 12-May-2019 mpi

Switch the list of span interfaces and interfaces to SMR.

This removes the KERNEL_LOCK() around the list iteration in bridge_enqueue().

Since the NET_LOCK() isn't protecting any data structure, release it early
in all the code paths coming from the Network Stack to prevent possible
deadlock situations with smr_barrier().

bridge_input() is still KERNEL_LOCK()ed as well as bridge_filterrule().

ok visa@


# 1.18 28-Apr-2019 mpi

Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.

This redefines the ifp <-> bridge relationship. No lock can be
currently used across the multiples contexts where the bridge has
tentacles to protect a pointer, use an interface index.

Tested by various, ok dlg@, visa@


Revision tags: OPENBSD_6_5_BASE
# 1.17 08-Mar-2019 mpi

Move the tag mechanism outside of net/if_bridge.c.

This will help for future (un)locking.

ok visa@


# 1.16 20-Feb-2019 mpi

Protect the hash table with a mutex.

inputs & ok visa@


# 1.15 17-Feb-2019 mpi

Make bridge_rtupdate() return an error value instead of a pointer.


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.19 12-May-2019 mpi

Switch the list of span interfaces and interfaces to SMR.

This removes the KERNEL_LOCK() around the list iteration in bridge_enqueue().

Since the NET_LOCK() isn't protecting any data structure, release it early
in all the code paths coming from the Network Stack to prevent possible
deadlock situations with smr_barrier().

bridge_input() is still KERNEL_LOCK()ed as well as bridge_filterrule().

ok visa@


# 1.18 28-Apr-2019 mpi

Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.

This redefines the ifp <-> bridge relationship. No lock can be
currently used across the multiples contexts where the bridge has
tentacles to protect a pointer, use an interface index.

Tested by various, ok dlg@, visa@


Revision tags: OPENBSD_6_5_BASE
# 1.17 08-Mar-2019 mpi

Move the tag mechanism outside of net/if_bridge.c.

This will help for future (un)locking.

ok visa@


# 1.16 20-Feb-2019 mpi

Protect the hash table with a mutex.

inputs & ok visa@


# 1.15 17-Feb-2019 mpi

Make bridge_rtupdate() return an error value instead of a pointer.


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.18 28-Apr-2019 mpi

Removes the KERNEL_LOCK() from bridge(4)'s output fast-path.

This redefines the ifp <-> bridge relationship. No lock can be
currently used across the multiples contexts where the bridge has
tentacles to protect a pointer, use an interface index.

Tested by various, ok dlg@, visa@


Revision tags: OPENBSD_6_5_BASE
# 1.17 08-Mar-2019 mpi

Move the tag mechanism outside of net/if_bridge.c.

This will help for future (un)locking.

ok visa@


# 1.16 20-Feb-2019 mpi

Protect the hash table with a mutex.

inputs & ok visa@


# 1.15 17-Feb-2019 mpi

Make bridge_rtupdate() return an error value instead of a pointer.


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.17 08-Mar-2019 mpi

Move the tag mechanism outside of net/if_bridge.c.

This will help for future (un)locking.

ok visa@


# 1.16 20-Feb-2019 mpi

Protect the hash table with a mutex.

inputs & ok visa@


# 1.15 17-Feb-2019 mpi

Make bridge_rtupdate() return an error value instead of a pointer.


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.16 20-Feb-2019 mpi

Protect the hash table with a mutex.

inputs & ok visa@


# 1.15 17-Feb-2019 mpi

Make bridge_rtupdate() return an error value instead of a pointer.


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.15 17-Feb-2019 mpi

Make bridge_rtupdate() return an error value instead of a pointer.


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.14 14-Feb-2019 mpi

Use timeout_barrier() when bringing the bridge(4) down and only execute
the timeout handler if the interface is running.

ok claudio@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.13 12-Dec-2018 mpi

Various cleanups:

- Unify the two hooks by passing the same argument
- Check for nullity before dereferencing `if_bridgeport', this will
matter when we go MP
- Use the same pattern to find a member in the ioctl path


ok bluhm@, visa@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.12 14-Nov-2018 mpi

Batch copyout(9)s in preparation for finer locking.

Tested by Hrvoje Popovski, inputs and ok visa@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.11 26-Oct-2018 mpi

Make it clear that `if_bridgeport' is dereferenced in the ioctl path
by making all handlers consistent.

ok bluhm@, visa@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.10 22-Oct-2018 mpi

Rename 'bridge_iflist' variables for coherency, missed in previous.


Revision tags: OPENBSD_6_4_BASE
# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.9 27-Sep-2018 mpi

Coherently name "struct bridge_iflist" variables `bif'.

ok visa@


Revision tags: OPENBSD_6_3_BASE
# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


# 1.8 05-Feb-2018 henning

bcmp -> memcmp; kinda req'd / not-just-kinda ok'd by claudio


# 1.7 05-Feb-2018 henning

implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@


Revision tags: OPENBSD_6_2_BASE
# 1.6 04-May-2017 bluhm

Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.5 11-Jan-2017 mpi

No need for a splsoftnet()/splx() dance when the KERNEL_LOCK() is what
serialize access to bridge(4) data structures.

ok mikeb@


# 1.4 29-Sep-2016 reyk

Rename brtag_src/brtag_dst to brtag_peer/brtag_local to avoid
confusion about the tunnel endpoints when responding to the peer.

OK yasuoka@


# 1.3 03-Sep-2016 reyk

Add support for a multipoint-to-multipoint mode in vxlan(4). In this
mode, vxlan(4) must be configured to accept any virtual network
identifier with "vnetid any" and added to a bridge(4) or switch(4).
This way the driver will dynamically learn the tunnel endpoints and
their vnetids for the responses and can be used to dynamically bridge
between VXLANs. It is also being used in combination with switch(4)
and the OpenFlow tunnel classifiers.

With input from yasuoka@ goda@
OK deraadt@ dlg@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.2 02-Dec-2015 mpi

Include cleanup.


# 1.1 01-Dec-2015 goda

Split functions in if_bridge.c into if_bridge.c bridgectl.c .

Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.

ok reyk@ mpi@ yasuoka@