Commit Graph

2145 Commits

Author SHA1 Message Date
tron
11677c694e Fix weird hardware address assignment that GCC 4.5 complains about. 2011-07-19 19:42:27 +00:00
joerg
3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
drochner
37cdb98bb0 back out previous - this should be unnecessary on NetBSD due to
the extra validation introduced in rev.1.42 (and pulled up to netbsd-5)
2011-07-14 12:44:10 +00:00
drochner
d5aac921d3 clear the packet filter's scratch memory before running the filter
program, otherwise kernel memory can be leaked, from Guy Harris
per PR kern/45142
2011-07-14 10:43:55 +00:00
kefren
3837722c76 Avoid putting implicit null labels on the wire 2011-07-03 18:46:12 +00:00
joerg
017dd250ef Fix memset usage. 2011-07-01 02:46:24 +00:00
wiz
4cbd24b23f dependant -> dependent 2011-06-30 20:09:15 +00:00
kefren
561daf4fe9 make LSE prepend the rest of the shims in they exist 2011-06-22 19:08:29 +00:00
kefren
bd098fd968 learn mpls interface how to prepend multiple shims by using a vector of
smpls_addrs in sockaddr_mpls. The number of smpls_addrs is found from
smpls_len. First label encountered is BoS.
XXX: need to do the same for LSE and this feature needs to be documented.
2011-06-21 14:30:19 +00:00
kefren
f33cde5958 Avoid computing INET[6] cksums for MPLS packets 2011-06-20 09:43:27 +00:00
kefren
a91123ebd3 teach loopback about MPLS. Prerequisite for MPLS tunnels 2011-06-17 09:15:24 +00:00
kefren
87fd7aebe4 use ETHERTYPE_MPLS only for unicast packets (RFC3032) 2011-06-16 19:47:30 +00:00
christos
eb8da70733 setting things once is enough. 2011-06-10 00:10:35 +00:00
drochner
2cd69bbbad more "const" 2011-06-09 19:54:18 +00:00
drochner
0a8dabda40 pull in AES-GCM/GMAC support from OpenBSD
This is still somewhat experimental. Tested between 2 similar boxes
so far. There is much potential for performance improvement. For now,
I've changed the gmac code to accept any data alignment, as the "char *"
pointer suggests. As the code is practically used, 32-bit alignment
can be assumed, at the cost of data copies. I don't know whether
bytewise access or copies are worse performance-wise. For efficient
implementations using SSE2 instructions on x86, even stricter
alignment requirements might arise.
2011-05-26 21:50:02 +00:00
matt
1cce8ae3bd Add code to auto-deencapsulate 0 tagged VLANs. 2011-05-24 17:16:43 +00:00
joerg
7800ff71d5 Use proper format string 2011-05-24 16:37:49 +00:00
joerg
15e751808f simplify 2011-05-23 21:52:54 +00:00
drochner
fefed2101c add IANA number for camellia-cbc, copied from FreeBSD 2011-05-05 17:46:48 +00:00
yamt
0cc7ac519a undefer csum in looutput.
looutput is used by various code (ether_output, mcast) to loopback packets.
2011-04-25 22:20:59 +00:00
yamt
022ceac2bd fix module build 2011-04-25 22:16:21 +00:00
yamt
21f7828965 use ETHER_IS_MULTICAST macro. no functional changes. 2011-04-25 22:14:45 +00:00
sborrill
bfaa893b9f PR kern/38871
Fix LAN on bge(4), alc(4). Flag VLAN capability in ec_capenable as used by network
card drivers.
2011-04-08 13:56:51 +00:00
mbalmer
1571556be6 Fix misplaced parenthesis. From henning.petersen@t-online.de, thanks. 2011-04-02 08:11:31 +00:00
dyoung
060522dec8 Hide the radix-trie implementation of the forwarding table so that we
will have an easier time replacing it with something different, even if
it is a second radix-trie implementation.

sys/net/route.c and sys/net/rtsock.c no longer operate directly on
radix_nodes or radix_node_heads.

Hopefully this will reduce the temptation to implement multipath or
source-based routing using grotty hacks to the grotty old radix-trie
code, too. :-)
2011-03-31 19:40:51 +00:00
christos
e826c9f234 lib/44807: something broken in stat(2), return that we are a character
device in st_mode.
2011-03-30 21:34:08 +00:00
bouyer
22637b9c37 Allocate buffers with (M_WAITOK | M_CANFAIL) instead of M_NOWAIT.
M_NOWAIT cause dhcpd on a low-memory server with lots of interfaces to
occasionally fail to start with ENOBUFS; (M_WAITOK | M_CANFAIL) seems to
fix this.
Tested on 3 different dhcp servers.
2011-03-30 18:04:27 +00:00
cegger
126af76cac add MBSS. From FreeBSD. 2011-02-20 13:51:17 +00:00
christos
42b61c5ccd delint. 2011-02-19 17:21:48 +00:00
enami
01ec12c085 Fix userland build. 2011-02-19 08:46:41 +00:00
christos
6f035a2d13 Use kmem instead of malloc. Requested by rmind. 2011-02-19 04:10:47 +00:00
matt
6e0e9b9067 Use __CTASSERT 2011-02-19 02:22:27 +00:00
christos
4a5bd76895 Avoid stack memory disclosure by keeping track during filter validation time
of initialized memory. Idea taken from linux.
2011-02-19 01:12:39 +00:00
kefren
159fa1bbe5 Allow changing route flags. Should fix PR/40455
OK'ed: dyoung@
2011-02-10 07:42:18 +00:00
rmind
fba2c6b806 Bump NPF_VERSION. 2011-02-02 23:01:34 +00:00
rmind
07ac07d35f NPF checkpoint:
- Add libnpf(3) - a library to control NPF (configuration, ruleset, etc).
- Add NPF support for ftp-proxy(8).
- Add rc.d script for NPF.
- Convert npfctl(8) to use libnpf(3) and thus make it less depressive.
  Note: next clean-up step should be a parser, once dholland@ will finish it.
- Add more documentation.
- Various fixes.
2011-02-02 02:20:24 +00:00
chuck
e3e22c95ba udpate license clauses on my code to match the new-style BSD licenses.
based on diff that rmind@ sent me.

no functional change with this commit.
2011-02-01 19:40:24 +00:00
matt
4d5d6d9aa5 Add a new AF/PF_ROUTE which is 64-bit clean which makes the routing socket
interface (and its associated sysctls) act identically for both 32 and 64 bit
programs.  The old unclean one remains for backward compatibility.
2011-02-01 01:39:19 +00:00
dyoung
c2126ca4c3 Update comment on RTM_CHGADDR to describe better what it's for. 2011-01-26 00:58:36 +00:00
dyoung
7617f65929 Add some 10-gigabit media words used by Intel 82599. 2011-01-26 00:57:47 +00:00
christos
87c238c4a3 undo previous. Read the diff wrong. 2011-01-22 19:12:58 +00:00
christos
6c793dc721 fix comment 2011-01-22 16:54:48 +00:00
rmind
f938371887 NPF checkpoint:
- Add the concept of rule procedure: separate normalization, logging and
  potentially other functions from the rule structure.  Rule procedure can be
  shared amongst the rules.  Separation is both at kernel level (npf_rproc_t)
  and configuration ("procedure" + "apply").
- Fix portmap sharing for NAT policy.
- Update TCP state tracking logic.  Use TCP FSM definitions.
- Add if_byindex(), OK by matt@.  Use in logging for the lookup.
- Fix traceroute ALG and many other bugs; misc clean-up.
2011-01-18 20:33:45 +00:00
tsutsui
d6f76b4a7b Fix off by one in ether_aton_r(). Noticed by "arp info overwritten" warning.
(how could it be missed for months?)
2011-01-12 15:30:40 +00:00
pooka
8d1e86d12d Apply patch from PR kern/44369 by Wolfgang Stukenbrock. 2011-01-11 10:52:42 +00:00
christos
d232460a0a kern/44310: Alexander Nasonov: write to /dev/bpf truncates size_t to int 2011-01-02 21:03:45 +00:00
uebayasi
ddbd4f2fb0 Fix build. 2010-12-27 14:58:55 +00:00
christos
d5760f00f3 merge the length getting code from rt_msg1 and rt_msg2 and make it fail
when the compatibility ifinfo is missing instead of returning junk.
2010-12-25 20:37:44 +00:00
rmind
628e094cdc NPF checkpoint:
- Add support for session saving/restoring.
- Add packet logging support (can tcpdump a pseudo-interface).
- Support reload without flushing of sessions; rework some locking.
- Revisit session mangement, replace linking with npf_sentry_t entries.
- Add some counters for statistics, using percpu(9).
- Add IP_DF flag cleansing.
- Fix various bugs; misc clean-up.
2010-12-18 01:07:25 +00:00
pooka
91a3d3404c linkset no more 2010-12-08 17:10:13 +00:00