summaryrefslogtreecommitdiff
path: root/sys/netinet/if_ether.c
AgeCommit message (Collapse)Author
2014-03-11Remove gratuitous differences between arp and nd6 rtrequests,Martin Pieuchot
no functional change. ok jca@
2014-03-10if_lladdr -> if_sadl, no functional change.Martin Pieuchot
ok mikeb@
2014-01-22Remove genmask support from the kernel. rtmsgs with RTA_GENMASK set willClaudio Jeker
now cause a EINVAL. The RTA_GENMASK and RTAX_GENMASK defines are kept for compatibility reasons. OK benno@ and agreed by dlg@
2014-01-10replace the rest of the obsolete radix macrosTed Unangst
sprinkle 0 -> NULL where obvious ok millert mpi
2014-01-09replace Bcopy macro with memmove and memcpy. ok mpiTed Unangst
2014-01-09bzero/bcmp -> memset/memcmp. ok matthewTed Unangst
2013-12-31bcopy -> memcpy. reviewed with one fix from matthewTed Unangst
2013-11-27Since r1.106 we have a local variable referencing the receiving interface,Martin Pieuchot
use it instead of dereferencing the mbuf once again. No functional change.
2013-11-21Replace the last usage of IA_SIN() and kill this macro.Martin Pieuchot
ok henning@, sthen@, mikeb@, deraadt@
2013-11-11Replace most of our formating functions to convert IPv4/6 addresses fromMartin Pieuchot
network to presentation format to inet_ntop(). The few remaining functions will be soon converted. ok mikeb@, deraadt@ and moral support from henning@
2013-10-31Convert the route expire timestamp in kernel and routing messageAlexander Bluhm
to 64 bit. Increase the routing message version from 4 to 5. Add a small compatibility layer that allows to set routes with old user land and new kernel. Old kernel with new user land does not work. The compatibility layer ist not perfect, but it allows to configure addresses with old ifconfig and new kernel. Route get also works in this setup. dhclient hangs as messages for interface address changes with old version are not generated. OK claudio@
2013-10-28tedu FDDI support and the 3 flavors the driver for DEC devices, evenMartin Pieuchot
miod@ cannot find two boards using the same media. With precious punctuation review from guenther@, thanks! ok deraadt@, henning@
2013-10-14By passing invalid values in the routing message, root could crashAlexander Bluhm
the kernel from user land. Add a null pointer check as quick fix. OK blambert@ claudio@
2013-09-03Use satosin() rather than the local SIN macro, no functional change.Martin Pieuchot
ok mikeb@
2013-08-29Iterate over the interface's address list instead of the global list.Martin Pieuchot
ok bluhm@, mikeb@
2013-08-28Remove unused argument from *rtrequest()Martin Pieuchot
ok krw@, mikeb@
2013-08-09Constify the default null sockaddr_dl, no functional change.Martin Pieuchot
ok mikeb@
2013-08-01Do not use a static variable to perform a lookup. While thisMartin Pieuchot
is perfectly ok for the moment because there might be at most one caller at a time, it wont be so as soon as this part of the network stack is run in parallel. ok henning@, mikeb@
2013-07-04Rewrite the function used to determine if we do proxy ARP for one ofMartin Pieuchot
our addresses to reuse arplookup() and do only one list iteration. Looks ok to claudio@, ok mikeb@
2013-03-28code that calls timeout functions should include timeout.hTed Unangst
slipped by on i386, but the zaurus doesn't automagically pick it up. spotted by patrick
2013-03-28no need for a lot of code to include proc.hTed Unangst
2013-03-28Unfortunately the satosin, sintosa, ifatoia, satosin6, sin6tosa,Alexander Bluhm
ifatoia6 macros do not check the source type. They just cast anything. Remove needless casts and do not use those macros if the source type does not match. Remove duplicate defines. No binary change. OK kettenis@ krw@
2013-03-22simple replacement of LIST_END with NULL. ok mpiTed Unangst
2013-03-07Remove the IFAFREE() macro, the ifafree() function it was calling alreadyMartin Pieuchot
check for the reference counter. ok mikeb@, miod@, pelikan@, kettenis@, krw@
2012-10-18Move revarp code into #ifdef NFSCLIENT; saving space on some media.Theo de Raadt
Resurrect the rather silly "unplug my network device while I am doing nfs diskless revarp" safety code which was disabled due to a missing "ether.h" include, found by jsg ok jsg
2012-10-05Point an interface directly to its bridgeport configuration, insteadCamiel Dobbelaar
of to the bridge itself. This is ok, since an interface can only be part of one bridge, and the parent bridge is easy to find from the bridgeport. This way we can get rid of a lot of list walks, improving performance and shortening the code. ok henning stsp sthen reyk
2012-10-05missing NCARP define and fix indentCamiel Dobbelaar
2011-09-18Fix various format string types to as a minimum match the width of theMiod Vallat
variables being processed. ok bluhm@ henning@
2011-07-06cosnistently use IFQ_SET_MAXLEN, surfaced in a discussion with + ok bluhmHenning Brauer
2011-07-05fix bizarre and mostly useless initialization of an ifqueue in BSS thatHenning Brauer
again makes assumptions of the ifqueue internals, ok ryan claudio
2011-07-05ansifyDavid Hill
ok claudio@
2011-06-27Mark ARP request broadcasts with M_BCAST in the mbuf flags.Camiel Dobbelaar
Fixes a case in bridge_output() where ARP requests are not broadcast on interfaces without the discovery flag. ok claudio deraadt
2010-07-22remove unused variableTheo de Raadt
2010-06-28Add the rtable id as an argument to rn_walktree(). Functions likeClaudio Jeker
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@
2010-05-07Start cleaning up the mess called rtalloc*. Kill rtalloc2, make rtalloc1Claudio Jeker
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
2010-04-06spacingTheo de Raadt
2010-02-08arpioctl() is not used sore remove it. Found by Gleydson Soares.Claudio Jeker
2010-01-13Remove special bridge code in in_arpinput() this is no longer needed sinceClaudio Jeker
we now correctly broadcast packets to all local ports. OK deraadt@
2009-11-03rtables are stacked on rdomains (it is possible to have multiple routingClaudio Jeker
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@
2009-10-17Allow us to accept gratuitous ARP requests in cases where theMarco Pfatschbacher
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.
2009-06-05Initial support for routing domains. This allows to bind interfaces toClaudio Jeker
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@
2008-12-24Fix two mbuf leaks in arpresolve. The first one happens on IFF_NOARPClaudio Jeker
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@
2008-10-31Be way more strict in the number of packets allowed to be queued in theClaudio Jeker
arp layer. With a lot of input from deraadt@. OK dlg@, looks good gollo@ + deraadt@
2008-10-30Arpresolve could loose few packets during resolving an ethernetJoerg Goltermann
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@
2008-09-10Convert timeout_add() calls using multiples of hz to timeout_add_sec()Bret Lambert
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
2008-06-06we must not hardcode the route priority in arplookup, it does notHenning Brauer
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
2008-05-11Try harder to avoid corrupting the mbuf pool. Stuff any mbuf chain inKenneth R Westerback
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@
2008-05-09more rtrequest() to rtrequest1() replacement.Claudio Jeker
OK henning@
2008-05-09arp entries in the routing table should have priority RTF_CONNECTEDHenning Brauer
ok claudio theo
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@