| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
if_vinput requires mpsafe interface counters, so gif is a bit more
mpsafe now than it was before. using if_vinput means monitor mode
works on gif now too.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most clonable interface drivers (except bridge, enc, loop, pppx,
switch, trunk and vlan) initialise the send queue's length to IFQ_MAXLEN
during *_clone_create() even though ifq_init(), which is eventually called
through if_attach(), does the same.
Remove all early "ifq_set_maxlen(&ifq->if_snd, IFQ_MAXLEN);" lines to leave
it to ifq_init() and have clonable drivers a tad more in sync.
OK mvs
|
|
|
|
| |
ok dlg@ tobhe@
|
|
|
|
|
| |
i've been wanting to do this for a while, and now that we've got
stoeplitz and it gives us 16 bits, it seems like the right time.
|
|
|
|
|
|
| |
ip_ether.h is where netinet/ip_ipip.h got the forward declaration
for struct tdb from though, so fix that before cutting ip_ether.h
out of gif.
|
|
|
|
| |
reduces code duplication and chance for error.
|
|
|
|
| |
ok claudio@
|
|
|
|
|
|
| |
this is a step toward better rfc6040 support
ok claudio@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
previously the gif code would patch the tos field and not recalc
the cksum, which would cause ip input code to drop the packet due
to a cksum failure. the ipip code patched ip_tos and unconditionally
recalculated the cksum, making it correct, but also wiping out any
errors that may have been present before the recalculation. updating
the cksum rather than replacing it lets cksum failures still fire.
ip_tos_patch() is provided in the ecn code since it's because of ecn
propagation that we need to update the tos field. internally it
works like pf_patch_8 and pf_cksum_fixup, but since pf is optional
it rolls its own code. procter may fix that in the future...
ok claudio@
|
|
|
|
| |
it works less well when you look before the adj
|
| |
|
| |
|
|
|
|
|
| |
rfc1853 is about IP in IP Tunneling. rfc2003 about IP Encapsulation
within IP agrees.
|
| |
|
|
|
|
|
|
|
| |
gif encaps l3, so it can get a prio from the payload, as well as
from the mbuf itself, or a hardcoded value.
ok claudio@
|
| |
|
|
|
|
|
|
|
| |
pointer in the IP protocol loop. Reset the loop's mbuf when the
mbuf is freed. The latter is not necessary, but clearing a pointer
to freed data is safer.
OK dlg@
|
|
|
|
|
| |
found by and diff from peter j philip
ok jca@
|
|
|
|
|
|
|
|
|
| |
this is to suppress loops over the interface, and avoids a leak of
the tag on every packet.
found and fix testd by christian barthel
also tested by job snijders
ok bluhm@
|
|
|
|
|
|
|
|
| |
The check prevents incomming multicast packages from arriving at the gif
interface (eg. OSPF) when the traffic is protected by IPsec in transport
mode.
ok dlg@
|
|
|
|
|
|
|
|
| |
i was assigning to ip dst to both the key src and dst, which meant
no traffic matched and it fell through the network stacks ipip
processing.
based on some excellent investigation by andreas bartelt.
|
| |
|
|
|
|
|
| |
this is a port of the change made to if_etherip.c r1.35 to allow
addresses to be configured before the tunnel is configured.
|
|
|
|
|
|
|
|
|
| |
while here, give us support for mpls in gif on ipv6.
this moves all the gif handling into if_gif, eg, the mpls handling
is no longer in ip_etherip.c.
ok claudio@
|
|
|
|
|
|
| |
the main win is the simplification of bpf in the ouput path.
ok visa@
|
|
|
|
|
|
| |
memory shortage. As it is invoked from a system call, it should
not fail and wait instead.
OK visa@ mpi@
|
|
|
|
|
|
|
|
| |
if_start() is a boundary between the network stack and drivers. The
states it modifies must be protected by the driver, so we should not
require the NET_LOCK() there.
ok bluhm@, visa@
|
|
|
|
|
|
| |
pr_input handlers without KERNEL_LOCK().
ok visa@
|
|
|
|
| |
ok visa@ as part of a larger diff
|
|
|
|
| |
ok visa@ mpi@
|
| |
|
|
|
|
|
|
|
|
| |
vxlan(4) like it is done by other tunnelling pseudo-interfaces.
While here sync the comment between multiple interfaces.
Bug report and original diff from Pierre LALET.
|
|
|
|
|
|
|
|
|
|
|
| |
- SIOCSIFPHYADDR
- SIOCSIFPHYADDR_IN6
- SIOCGIFPSRCADDR
- SIOCGIFPSRCADDR_IN6
- SIOCGIFPDSTADDR
- SIOCGIFPDSTADDR_IN6
ok bluhm@
|
|
|
|
| |
Tested by Hrvoje Popovski, ok bluhm@
|
|
|
|
|
|
| |
to ipip_input_if() and always pass the ifp. Only dump the packet
to bpf if we are called with a gif(4) interface.
OK mpi@
|
|
|
|
|
|
|
| |
bugs could easily result in use-after-free or double free. Introduce
m_freemp() which automatically resets the pointer before freeing
it. So we have less dangling pointers in the kernel.
OK krw@ mpi@ claudio@
|
|
|
|
|
|
|
|
|
|
| |
packets. This is the IP in IP protocol input function, so call it
ipip_input(). Rename the existing ipip_input() to ipip_input_gif()
as it is the input function used by the gif interface. Pass the
address family to make it consistent with pr_input. Use __func__
in debug print and panic messages. Move all ipip prototypes to the
ip_ipip.h header file.
OK dhill@ mpi@
|
|
|
|
| |
ok bluhm@
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
| |
allows to simplify code used for both IPv4 and IPv6.
OK mikeb@ deraadt@
|
|
|
|
|
|
|
| |
to get rid of struct ip6protosw and some wrapper functions. It is
more consistent to have less different structures. The divert_input
functions cannot be called anyway, so remove them.
OK visa@ mpi@
|
|
|
|
|
|
| |
make the variable parameters of the protocol input functions fixed.
Also add the proto to make it similar to IPv6.
OK mpi@ guenther@ millert@
|
|
|
|
|
|
|
|
|
| |
only once per packet.
Fix a regression introduced when if_input() started to be called by
every pseudo-driver.
ok claudio@, dlg@
|
|
|
|
|
|
|
| |
this means packets are consistently counted in one place, unlike the
many and various ways that drivers thought they should do it.
ok mpi@ deraadt@
|
|
|
|
| |
an earlier version of this diff was ok mpi@
|
|
|
|
| |
ok claudio@, deraadt@
|
| |
|
|
|
|
| |
From David Hill, ok dlg@
|
| |
|