summaryrefslogtreecommitdiffstats
path: root/sys/netinet/if_ether.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix various format string types to as a minimum match the width of themiod2011-09-181-2/+2
| | | | | variables being processed. ok bluhm@ henning@
* cosnistently use IFQ_SET_MAXLEN, surfaced in a discussion with + ok bluhmhenning2011-07-061-2/+2
|
* fix bizarre and mostly useless initialization of an ifqueue in BSS thathenning2011-07-051-2/+3
| | | | again makes assumptions of the ifqueue internals, ok ryan claudio
* ansifydhill2011-07-051-48/+20
| | | | ok claudio@
* Mark ARP request broadcasts with M_BCAST in the mbuf flags.camield2011-06-271-1/+3
| | | | | | | Fixes a case in bridge_output() where ARP requests are not broadcast on interfaces without the discovery flag. ok claudio deraadt
* remove unused variablederaadt2010-07-221-2/+2
|
* Add the rtable id as an argument to rn_walktree(). Functions likeclaudio2010-06-281-8/+6
| | | | | | | rt_if_remove_rtdelete() need to know the table id to be able to correctly remove nodes. Problem found by Andrea Parazzini and analyzed by Martin Pelikán. OK henning@
* Start cleaning up the mess called rtalloc*. Kill rtalloc2, make rtalloc1claudio2010-05-071-2/+2
| | | | | | | | accept flags for report and nocloning. Move the rtableid into struct route (with a minor twist for now) and make a few more codepathes rdomain aware. Appart from the pf.c and route.c bits the diff is mostly mechanical. More to come... OK michele, henning
* spacingderaadt2010-04-061-2/+2
|
* arpioctl() is not used sore remove it. Found by Gleydson Soares.claudio2010-02-081-10/+1
|
* Remove special bridge code in in_arpinput() this is no longer needed sinceclaudio2010-01-131-37/+1
| | | | | we now correctly broadcast packets to all local ports. OK deraadt@
* rtables are stacked on rdomains (it is possible to have multiple routingclaudio2009-11-031-3/+3
| | | | | | | | | | | | | | tables on top of a rdomain) but until now our code was a crazy mix so that it was impossible to correctly use rtables in that case. Additionally pf(4) only knows about rtables and not about rdomains. This is especially bad when tracking (possibly conflicting) states in various domains. This diff fixes all or most of these issues. It adds a lookup function to get the rdomain id based on a rtable id. Makes pf understand rdomains and allows pf to move packets between rdomains (it is similar to NAT). Because pf states now track the rdomain id as well it is necessary to modify the pfsync wire format. So old and new systems will not sync up. A lot of help by dlg@, tested by sthen@, jsg@ and probably more OK dlg@, mpf@, deraadt@
* Allow us to accept gratuitous ARP requests in cases where thempf2009-10-171-18/+31
| | | | | | | | | link-route points over the carp interface. (IP-less carpdev) The descision whether to drop an ARP query is now expressed with a goto out; rather than a second check later, which prevented the carpdev case to work. Also add some comments to make in_arpinput() easier to understand. OK henning, markus.
* Initial support for routing domains. This allows to bind interfaces toclaudio2009-06-051-10/+20
| | | | | | | | | alternate routing table and separate them from other interfaces in distinct routing tables. The same network can now be used in any doamin at the same time without causing conflicts. This diff is mostly mechanical and adds the necessary rdomain checks accross net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6. input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@
* Fix two mbuf leaks in arpresolve. The first one happens on IFF_NOARPclaudio2008-12-241-2/+5
| | | | | | | | interfaces and is probably never hit. The other one happens when the number of packets on the arp hold queue is exceeded. If arpresolve() returns NULL the mbuf must be on the hold queue or freed. Fixes the mbuf leak seen by dlg@. Found with dlg@'s insane mbuf leak diff. OK dlg@
* Be way more strict in the number of packets allowed to be queued in theclaudio2008-10-311-16/+28
| | | | | arp layer. With a lot of input from deraadt@. OK dlg@, looks good gollo@ + deraadt@
* Arpresolve could loose few packets during resolving an ethernetgollo2008-10-301-18/+57
| | | | | | | | | address. This cvs commit introduces a queue that buffers a small burst of packets and resending the packets in correct order when the ethernet address is resolved. Code written by Armin Wolfermann <aw@osn.de>. OK: claudio@ henning@
* Convert timeout_add() calls using multiples of hz to timeout_add_sec()blambert2008-09-101-3/+3
| | | | | | | Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
* we must not hardcode the route priority in arplookup, it does nothenning2008-06-061-2/+1
| | | | | | | just insert arp entries. the inserted routes will have the right priority no matter what, most times cloned. problem found by Joerg Goltermann <jg@osn.de>, fix by his colleague Armin Wolgermann <aw@osn.de>, ok claudio
* Try harder to avoid corrupting the mbuf pool. Stuff any mbuf chain inkrw2008-05-111-4/+9
| | | | | | | | ln_hold or la_hold into temporary storage and null ln_hold or la_hold before manually processing the mbuf chain. Discard the mbuf chain if it is put back in the hold area. ok claudio@ markus@
* more rtrequest() to rtrequest1() replacement.claudio2008-05-091-7/+16
| | | | OK henning@
* arp entries in the routing table should have priority RTF_CONNECTEDhenning2008-05-091-1/+2
| | | | ok claudio theo
* the softnet intr handlers check if the input queue has packets ondlg2008-04-241-2/+2
| | | | | | | | | | | | | | | 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@
* Move carp load balancing (ARP/IP) to a simpler configuration scheme.mpf2008-02-051-12/+10
| | | | | | | | | | | | | | Instead of using the same IP on multiple interfaces, carp has to be configured with the new "carpnodes" and "balancing" options. # ifconfig carp0 carpnodes 1:0,2:100,3:100 balancing ip carpdev sis0 192.168.5.50 Please note, that this is a flag day for anyone using carp balancing. You'll need to adjust your configuration accordingly. Addititionally this diff adds IPv6 NDP balancing support. Tested and OK mcbride@, reyk@. Manpage help by jmc@.
* Do not panic in arpintr() if IF_DEQUEUE returns NULL, this is perfectly legalmiod2007-11-061-2/+6
| | | | and can happen on slow mp systems under a lot of network load; ok kettenis@
* Change the "can't allocate llinfo" to a better log message that includesclaudio2007-03-251-4/+10
| | | | | the problemantic IP address and a hopefully better reason message. After discussion with dtucker@, "fine with me" deraadt@ some time ago
* Add IP load balancing support for carp(4).mpf2007-03-181-2/+9
| | | | | | | | | | | | | This provides a similar functionality as ARP balancing, but also works for traffic that comes across routers. IPv6 is supported as well. The configuration scheme will change as soon we have sth better. Also add support for changing the MAC address on carp(4) interfaces. (code from mcbride) Tested by pyr@ and reyk@ OK mcbride@
* remove message that printsderaadt2007-03-161-4/+1
| | | | | | | | arplookup: unable to enter address for xxx.xxx.xxx.xxx because it is absolutely useless in a modern world with cable modems which leak arp packets over IP netblock zones; Anyone who used this as a diagnostic for real problems has other tools to use; from discussion with kitella, ok claudio
* Answer ARP queries also for addresses on carp interfaces, if carpsmpf2006-08-211-4/+14
| | | | | | | physical interface shares a bridge with the interface that received it. Patch based on a version from camield@ Fixes PR 5178. OK mcbride@
* adjust functions dealing with the routing table to take a table ID ashenning2006-06-161-5/+5
| | | | | | parameter so they can work on alternate tables. table 0 hardcoded for many callers yet, that will be adapted step by step. input + ok claudio norby hshoexer
* prevent anything outside rote.c from accessing the routing table headshenning2006-03-221-2/+2
| | | | | | | | directly. rather provide a rt_lookup function for regular lookups, and a rt_gettable for those that need access to the head for some reason. the latter cases should be revisted later probably so that nothing outside the routing core code accesses the heads at all... tested claudio jolan me, ok claudio markus
* With the exception of two other small uncommited diffs this movesbrad2006-03-041-2/+2
| | | | | | the remainder of the network stack from splimp to splnet. ok miod@
* something in the eurobsdcon route-a-thon broke my simple home networkjolan2005-11-291-2/+2
| | | | | | | | | | | | | | router so back out the routing stuff to pre-eurobsdcon where my machine doesn't crash immediately. i am happy to test diffs and report success/failures but i am not happy to have instantaneous crashes when i reboot with a new kernel that was compiled from pristine sources. if you are going to be an elitist asshole then you could at least make sure your code works. ok and "be crass towards them" deraadt@
* don't let anything outside route.c access the routing table heads directly,henning2005-11-271-2/+2
| | | | | | but go through a provided wrapper. also provide rt_lookup() instead of doing the lookup manually in many places. ryan ok
* minor whitespace cleanuppascoe2005-07-251-6/+6
|
* Unbreak arp_input with carp; add back the call to carp_iamatch()mcbride2005-03-011-4/+21
| | | | | | | which was removed in rev 1.57. This makes arpbalance work again, and ensures that only one carp host will reply to a given arp request. ok mpf@ pascoe@ dhartmei@ deraadt@
* Move processing of ARP packets for CARP addresses to the carp interfacepascoe2005-01-041-9/+6
| | | | | | | | | | | | instead of processing them in the parent interface. This causes us to send ARP packets on a carpdev with its virtual MAC address as the source, rather than the parent's physical address. Permits us to fail over cleanly when connected to devices that use the source MAC address on a received ARP request to generate an ARP entry for the requesting host, rather than going through the who-has/is-at procedure. ok niklas@ mcbride@
* Use pseudo_AF_HDRCMPLT for outgoing ARP messages, otherwise the providedpascoe2005-01-041-4/+4
| | | | | | source MAC address we provide is ignored by ether_output. ok mcbride@ niklas@
* Convert carp(4) to behave more like a regular interface, much in the samemcbride2004-12-071-3/+7
| | | | | | | | style as vlan(4). carp interfaces no longer require the physical interface to be on the same subnet as the carp interface, or even that the physical interface has an adress at all, so CARP can now be used on /30 networks. ok deraadt@ henning@
* First step towards more sane time handling in the kernel -- this changestholo2004-06-211-10/+10
| | | | | | | | things such that code that only need a second-resolution uptime or wall time, and used to get that from time.tv_secs or mono_time.tv_secs now get this from separate time_t globals time_second and time_uptime. ok art@ niklas@ nordin@
* Permit ethernet multicast addresses, as used by some HA/failover solutions. Suggested by and ok markus@.ho2003-12-181-12/+7
|
* de-register. deraadt okitojun2003-12-101-26/+26
|
* Clean up carp_iamatch() behaviour so we don't reply to arp requests whenmcbride2003-11-071-3/+1
| | | | | | the interface is ifconfig'd down. Patch from Marco Pfatschbacher
* Common Address Redundancy Protocolmcbride2003-10-171-21/+32
| | | | | | | | | | Allows multiple hosts to share an IP address, providing high availability and load balancing. Based on code by mickey@, with additional help from markus@ and Marco_Pfatschbacher@genua.de ok deraadt@
* on-link DoS by bogus ARP. reported by appleitojun2003-09-241-2/+10
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* don't send ARP for secondary IPv4 addresses, treat them as local.itojun2003-05-171-3/+28
| | | | kwesterback tdeval ok
* Free mbuf when dropping invalid ARP with ar_hrd != ARPHRD_ETHER, insteaddhartmei2003-05-041-2/+4
| | | | | of leaking. Reported by orjan.sjelvgren@ignite.com. ok jason@, krw@ and henning@.
* whitespaceitojun2002-06-091-6/+6
|
* support published arp entries again. PR 2635 (confirmed by submitter).itojun2002-06-091-1/+12
|