summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2010-04-09encif is a global variable and thus pre-zeroed, don't bother bzero()ingOwain Ainsworth
it after the fact. ok henning@, claudio@
2010-04-09replace pool_get(), memset(,0,) with pool_get(,PR_ZERO) as $DEITYOwain Ainsworth
intended. ok claudio@, henning@
2010-04-06Simple implementation of RFC4941, "Privacy Extensions for StatelessStefan Sperling
Address Autoconfiguration in IPv6". For those among us who are paranoid about broadcasting their MAC address to the IPv6 internet. Man page help from jmc, testing by weerd, arc4random API hints from djm. ok deraadt, claudio
2010-04-03document the first byte of the random MAC addressTheo de Raadt
2010-04-02ugly spacingTheo de Raadt
2010-04-02Special-case SIOCADDMULTI and SIOCDELMULTI ioctls, based on code from if_tun.Stefan Sperling
Makes IPv6 work with if_vether. ok deraadt
2010-04-02allow this to compile in the never-gonna-happen world without INETTheo de Raadt
2010-03-23Fix a crash in pfsync when running IPSEC.Pierre-Yves Ritschard
Found out the hard way by Laurent ``bucky'' Lavaud and myself. Input by claudio@, ok dlg@
2010-03-23Set rtm_mpls on RTM_GET so that we get the correct options on mpls routes.Claudio Jeker
OK michele@
2010-03-23dont maintain a list of vether devices inside the driver if they are neverDavid Gwynne
looked up. can vether get any smaller? ok deraadt@ claudio@
2010-03-20Don't leak memory when resizing routing table arrayBret Lambert
ok claudio@
2010-03-08argh, in del too, simultaneously spotted by kettenis and meHenning Brauer
2010-03-08aye, broadcast addr too. spotted by kettenisHenning Brauer
2010-03-08don't call ifa_item_add/del in ifa_add/del, so the ifa RB tree doesn'tHenning Brauer
get used at all. turns out this needs more work - after release.
2010-03-05in ifa_ifwithaddr, do not use the shiny new RB tree, there is aHenning Brauer
balancing issue from wrong order of operations (change after insert is illegal with RB). and apparently there are cases left. to be revisited after release
2010-03-01shuffle slightly and add more splassert.David Gwynne
also protect the flushing of the deferred packet queue in clone_destroy with the right spls. noticed by claudio@
2010-02-24put back the line of code that copies the timestamp out for tablesHenning Brauer
tracked down by Dan Harnett <daniel at harnett.name>
2010-02-17dont defer broadcast or multicast packets.David Gwynne
ok sthen@ henning@
2010-02-09Set the rtm_priority when sending RTM_ADD/RTM_DELETE messages out inClaudio Jeker
rt_newaddrmsg(). Makes the routing daemons a bit less confused when interfaces are reconfigured.
2010-02-09Correctly track RTF_UP on RTM_CHANGE. Since the interface can changeClaudio Jeker
rt_if_linkstate_change() needs to be rerun for this route and the resulting rt_flags need to copied to the rtm_flags for userland. Problem found and diagnosed by Doran Mori. OK henning@, jsing@
2010-02-09Add 10GSFP+Cu to the Ethernet media types. This is for 10G direct attachedClaudio Jeker
cables. OK jsg@, krw@, sthen@
2010-02-08The IMPs are history so is splimp, this needs now splnet so update comment.Claudio Jeker
Another thing found by Gleydson Soares.
2010-02-04pf_get_sport() picks a random port from the port range specified in aStuart Henderson
nat rule. It should check to see if it's in-use (i.e. matches an existing PF state), if it is, it cycles sequentially through other ports until it finds a free one. However the check was being done with the state keys the wrong way round so it was never actually finding the state to be in-use. - switch the keys to correct this, avoiding random state collisions with nat. Fixes PR 6300 and problems reported by robert@ and viq. - check pf_get_sport() return code in pf_test(); if port allocation fails the packet should be dropped rather than sent out untranslated. Help/ok claudio@.
2010-01-20One \ too many in pfvar.h. From Daniel Dickman <didickman@gmail.com>Ryan Thomas McBride
ok otto
2010-01-18Convert pf debug logging to using log()/addlog(), a single standardisedRyan Thomas McBride
definition of DPFPRINTF(), and log priorities from syslog.h. Old debug levels will still work for now, but will eventually be phased out. discussed with henning, ok dlg
2010-01-14henning and I are both dumbasses, testing &foo against NULL is pointless.Ryan Thomas McBride
ok claudio
2010-01-14When printing states in debug output, print the rule number that createdRyan Thomas McBride
it if we have it. Requested by dlg, ok henning.
2010-01-14i forgot to remove a now obsolete comment in pf_create_state aboutHenning Brauer
incorrect error handling
2010-01-14in pf_create_state, when we fixed the leaks, we were a bit too triggerHenning Brauer
happy and went to use after free instead. ryan and I think we found the reason - just freeing that state keys in the error path is wrong as well, since pf_state_key_setup could have found existing, identical state keys and linked our state to these. if we now free them the other state that hung of these state keys would point back to the freed state keys. so instead of manually trying to free the state keys just call pf_state_key_detach which has all the magic checks. with and ok ryan
2010-01-13in pf_state_key_detach, ensure that the state key pointer on the stateHenning Brauer
is not null, to be safe and to be able to call this with half setup states. with and ok ryan
2010-01-13cleanup pipex code. ok henning@YASUOKA Masahiko
2010-01-13replace static on functions with Static so openbsd can define it awayDavid Gwynne
to nothing. this lets us see functions in ddb, while not hurting the ability to share the code with other projects. idea borrowed from the usb stack. ok yasuoka@
2010-01-13Preliminary rdomain support in bridge(4). Make sure that m->m_pkthdr.rdomainClaudio Jeker
is set whenever we changing the rcvif. It is still not possible to pass traffic between two vether but works now form outside. OK deraadt@
2010-01-13make ifa_ifwithaddr use the shiny new ifaddr RB tree instead of traversingHenning Brauer
the list of all interfaces and traversing the list of all addresses on each interface. if bugs show up with addressing this is the #1 backout candidate, something i missed might fuck with ifaddrs behind our back, although i looked & tested hard. 10x to naddy for inet6 testing. ok theo ryan dlg
2010-01-13maintain a global RB tree of all local addresses in the system. thisHenning Brauer
includes AF_LINK addresses (aka mac addresses in the ethernet case). for inet this also includes the broadcast addresses. depends on ifinit() called earlier so we have a chance to pool_init before autoconf assigns the AF_LINK addresses, the v6 fix, and the ifa_add/del abstraction i just committed. this is a change in semantics, it is now illegal to change the actual address in an ifaddr struct because then the RB tree becomes unbalanced. nothing using this tree yet. ok theo ryan dlg
2010-01-13instead of fiddling with the per-interface address lists directly inHenning Brauer
many places create a proper API (ifa_add / ifa_del) and use it. ok theo ryan dlg
2010-01-13Remove extern reference to pf_pabuf which uses a structJonathan Gray
which no longer exists. Makes gcc4 kernels compile again. ok henning@
2010-01-12factor m_pulldown out of the message handlers up into pfsync_input nowDavid Gwynne
that it knows how big the messages are. rework the message handlers to use the pfsync_subheader.len value to iterate over the message regions. deprecate the EOF subheader since trying to pulldown a 0 byte buffer is fail. ok mcbride@ sperreault@
2010-01-12delete more left-over stuff from vether developmentTheo de Raadt
2010-01-12the bridge does bpf for us, so we do not need bpf.hTheo de Raadt
2010-01-12delete the unused debug macrosTheo de Raadt
2010-01-12do not need rndvar.h anymoreTheo de Raadt
2010-01-12check the new pfsync_subheader len field on input.David Gwynne
this makes sure there is enough of the message to try and parse it, and allows implementations to skip past regions prefixed by unknown subheaders. based on discussion with mcbride@ deraadt@ and simon perreault
2010-01-12After calling pipex_pppoe_input(), we must goto done to restore the spl.YASUOKA Masahiko
ok mcbride@
2010-01-12Remove simple_unlock() that is mistakenly introduced and add requiredYASUOKA Masahiko
splx().
2010-01-12Move initialization of the MCLGETI ticker to mbinit(), instead of ifinit()Theo de Raadt
ok henning
2010-01-12Unify the various fake ethernet generators as ether_fakeaddr() whichTheo de Raadt
is safe for both hardware devices and virtual devices ok mpf, kettenis, moaning and groaning and slow acceptance from mcbride XXX should loop checking for uniqueness after new henning diff goes in
2010-01-12First pass at removing the 'pf_pool' mechanism for translation and routingRyan Thomas McBride
actions. Allow interfaces to be specified in special table entries for the routing actions. Lists of addresses can now only be done using tables, which pfctl will generate automatically from the existing syntax. Functionally, this deprecates the use of multiple tables or dynamic interfaces in a single nat or rdr rule. ok henning dlg claudio
2010-01-12Remove bpfdetach() call right in front of the if_detach() call sinceClaudio Jeker
bpfdetach() will be called in if_detach(). Diff by Gleydson Soares
2010-01-12Delete unused structures. Pointed out by deraadt@.YASUOKA Masahiko
ok mcbride@