summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2008-06-02Fix synproxy breakage introduced with the state table reorganization.Ryan Thomas McBride
Bug report and testing from Otto Bretz. ok henning@
2008-05-30trivial KNF before we go furtherHenning Brauer
2008-05-29Second half of PF state table rearrangement.Ryan Thomas McBride
- Mechanical change: Use arrays for state key pointers in pf_state, and addr/port in pf_state_key, to allow the use of indexes. - Fix NAT, pfsync, pfctl, and tcpdump to handle the new state structures. In struct pfsync_state, both state keys are included even when identical. - Also fix some bugs discovered in the existing code during testing. (in particular, "block return" for TCP packets was not returning an RST) ok henning beck deraadt tested by otto dlg beck laurent Special thanks to users Manuel Pata and Emilio Perea who did enough testing to actually find some bugs.
2008-05-29rewrite the state table logic.Henning Brauer
complete the split off of the layer 3/4 adressing information from the extra information in the actual state. a state key holds a list of states, and a state points to two state keys - they're only different in the NAT case. More specificially, it deprecates the (often difficult to understand) concept of lan, ext, and gwy addresses, replacing them with WIRE and STACK side address tuples. (af, proto, saddr, daddr, sport, dport). Concept first brought up some years ago on a ferry ride in bc by ryan and me, I spent some time over the last year getting closer, and finally got it completed in japan with ryan. dlg also took part, helped a lot, and saved us 8 bytes. This commit removes support for any kind of NAT as well as pfsync. It also paves the road for some code simplification and some very cool future stuff. ok ryan beck, tested by many
2008-05-23Deal with the situation when TCP nfs mounts timeout and processesThordur I. Bjornsson
get hung in nfs_reconnect() because they do not have the proper privilages to bind to a socket, by adding a struct proc * argument to sobind() (and the *_usrreq() routines, and finally in{6}_pcbbind) and do the sobind() with proc0 in nfs_connect. OK markus@, blambert@. "go ahead" deraadt@. Fixes an issue reported by bernd@ (Tested by bernd@). Fixes PR5135 too.
2008-05-21Only cancel (timeout_del()) the timeout if we're not going to delay itMichael Knudsen
(timeout_add()) anyway. ok brad claudio
2008-05-21Just clear the timeout since timeout_del() can cope withMichael Knudsen
unscheduled/already triggered timeouts. ok brad claudio
2008-05-18KNFRyan Thomas McBride
2008-05-17Initialize the timeouts only once instead of everytime they are startedCan Erkin Acar
Prevents hangs as reported and tested by James Stark, PR:5795, ok henning@
2008-05-15divert for ipv6; ok henning, pyrMarkus Friedl
2008-05-13Remove commented out NetBSD __KERNEL_RCSID macro usage.Brad Smith
ok dlg@
2008-05-11Check to make sure pp_tlf is not NULL in sppp_keepalive() before calling it.Brad Smith
From NetBSD ok canacar@
2008-05-11When passing opt[] array as an argument, use opt instead of &opt. WhileCan Erkin Acar
they point to the same address, this is more readable. ok claudio@
2008-05-10convert sdltosa to a real cast because I removed the silly makro last night.Claudio Jeker
2008-05-09replace rtrequest() with corresponding rtrequest1() replacement.Claudio Jeker
OK henning@
2008-05-09Add support to kill states by rule label or state id.Marco Pfatschbacher
Fix printing of the state id in pfctl -ss -vv. Remove the psnk_af hack to return the number of killed states. OK markus, beck. "I like it" henning, deraadt. Manpage help from jmc.
2008-05-09there was a race between the addition of mpls and tx mitigation. this givesDavid Gwynne
mpls its own bit in netisr instead of accidentally sharing one with tx mit. "do it" claudio@
2008-05-09Fix a logic botch around prioinv that resulted in wrong ordering of moreClaudio Jeker
specific routes. OK henning@
2008-05-09when cloning, copy the priority from the parent to the cloned route,Henning Brauer
claudio ok
2008-05-09divert packets to local socket without modifying the ip header;Markus Friedl
makes transparent proxies much easier; ok beck@, feedback claudio@
2008-05-09A little bit of magic to make arp lookups work in MPLS as they should.Claudio Jeker
No need to preload the arp table anymore. hai norby@
2008-05-08Add license and OpenBSD RCS Tag to the file, spotted by Dries Schellekens.Pierre-Yves Ritschard
2008-05-08reorder elements in pf_state_peer to avoid wasting memory. cvs blameTheo de Raadt
shows that 3 developers screwed this up. look carefully at this diff and learn how to avoid wasting memory. on a 64 bit architecture, each of these was using 40 bytes instead of 32. ok henning
2008-05-08Start at making mpe tap to bpf. While there move if_start() call insidePierre-Yves Ritschard
splnet. The DLT_MPLS will not go away and will be used for display in tcpdump -y mpls when the code is there, as suggested by reyk.
2008-05-08Hook mpe(4) correctly into mpls so that it is possible to tunnel packets overClaudio Jeker
MPLS. Still a bit hackish but getting closer. hai norby@
2008-05-08UP mpe interfaces.Esben Norby
ok claudio@
2008-05-07enable tx mitigation when putting packets on the wire by switching fromDavid Gwynne
calls to ifp->if_start to if_start(). these are the obviously right cases where we can do that, the less obvious ones may follow as theyre figured out. deraadt@ said to go for it
2008-05-07Add MPLS support to loopback.Esben Norby
Makes it possible to do evil tricks locally. ok claudio@
2008-05-07Missing return and correctly indent a debug printf.Claudio Jeker
2008-05-07add mpe_input() to be able to be fed packets that will reenter ip.Pierre-Yves Ritschard
no consumers yet, they should come soon. ok norby@
2008-05-07Make mpe a point-to-point interface.Pierre-Yves Ritschard
Make the mtu user definable. ok claudio@
2008-05-07scrub packets based on tags; ok henningMarkus Friedl
2008-05-07Correctly initialize labels by byte-swapping and inserting BoS and TTL.Pierre-Yves Ritschard
While there bump MTU to 1500 and set the receiving interface before calling mpls_input. mpestart will eventually call mpls_output when it exists. ``yaaaaayyy'' and ok claudio@ and norby@
2008-05-07allow setting TOS with scrub; ok mcbride, claudioMarkus Friedl
2008-05-07backout last change, it's already there....Markus Friedl
2008-05-07Prevent virtual interfaces from adding to the random pool.Marco Pfatschbacher
Also move the sampling into ether_input() where it can happen at the interrupt and not within splnet() processing, which might be less random. Discussed with mickey. OK markus@, mcbride@
2008-05-07Implement routing priorities. Every route inserted has a priority assignedClaudio Jeker
and the one route with the lowest number wins. This will be used by the routing daemons to resolve the synchronisations issue in case of conflicts. The nasty bits of this are in the multipath code. If no priority is specified the kernel will choose an appropriate priority. Looked at by a few people at n2k8 code is much older
2008-05-07Redo rev 1.8 but this time with an additional fix to solve the dhclient crashesClaudio Jeker
seen by krw. This is a prerequisite for upcomming routing priorities: Always compare the nexthop if one is specified even if it is a non-multipath route. This mostly affects "route delete" and it will not remove the last route if previous delete is redone. OK henning@
2008-05-07There is no reason to have a faithrtrequest() function that sets the MTU toClaudio Jeker
route MTU to the interface MTU. By default if no route MTU is set it will fall back to the interface MTU anyway. OK henning@
2008-05-06bring in the mpe interface - for ``MPLS Provider Edge'' - this is a workPierre-Yves Ritschard
in progress and some bits need to be cleaned up but will be in-tree for convenience. ok claudio@, norby@
2008-05-06Kill state if we get SYN for a state that has been closed from both sides.Markus Friedl
ok henning@
2008-05-06M_PREPEND can set its first parameter to NULL, and all other codeKenneth R Westerback
using M_PREPEND checks for NULL after the invocation. So check here too and return ENOBUFS if NULL is detected. ok henning@
2008-05-06Add a counter to record how many states have been created by a rule.Marco Pfatschbacher
It shows up in pfctl verbose mode and in the 7th field of the labels output. Also remove the label printing for scrub rules, as they do not support labels. OK dhartmei@ (on an earlier version), henning@, mcbride@
2008-05-06Prevent possible overflow of int variable on large memory machines.Tobias Weingartner
ok kettenis@
2008-05-05add lldp typeDavid Gwynne
2008-05-05in rt_gettable, we unfortunately have to check for rt_tables[id] != NULLHenning Brauer
before returning rt_tables[id][af2rtafidx[af]. when you created tables and left a hole (0 and 2 exist, 1 does not) it is possible to hit that case. issue found & ok claudio
2008-05-05remove a useless refcnt in pf_state_key.Henning Brauer
when it is in fact only used to delete the state key when the number of attached states (in a tailq) drops to zero, we can as well test for the queue beeing empty. this is a leftover from some early version that did things differently. ok ryan
2008-04-26Typo, paket -> packet.Brad Smith
2008-04-24the softnet intr handlers check if the input queue has packets onDavid Gwynne
it by reading the queues head pointer. if that pointer is not null then it takes splnet and dequeues a packet for handling. this is bad because the ifqueue head is modified at splnet and the sofnet handlers read it without holding splnet. this removes that check of the head pointer and simply checks if the dequeue gave us a packet or not before proceeding. found while reading mpls code. discussed with norby@ and henning@ ok mcbride@ henning@
2008-04-23Import MPLS (Multi Protocol Label Switching)Esben Norby
MPLS support partly based on the (abandoned?) AYAME project. Basic LSR (Label Switch Router) functionality is present, but not fully functional yet. It is currently possible to insert entries in the LIB (Label Information Base) with route(8), but setting the operation type is not supported yet. Imported to allow more people to work on this in the coming weeks. ok claudio@ laurent@ dlg@