summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2014-03-18Rename rt_gettable() into rtable_get(), swap its arguments to beMartin Pieuchot
coherent with the existing rtable_* functions and document it. While here fix some other manpage glitches pointed out by jmc@.
2014-03-17Remove pre-rt_getifa() code to find the address descriptor (ifa) relatedMartin Pieuchot
to a route entry, no need to do the work twice. This chunk should have been deleted when post-4.4BSD changes from BSD/OS 4.2 were merged more than 10 years ago. While here properly indent the following block. tested by chris@, ok krw@
2014-03-12RTAX_IFP points to the "struct sockaddr_dl" corresponding to theMartin Pieuchot
link-layer address of an interface. This ugly structure is used to export the interface's name and index, not only the link-layer address as its name might suggest. So instead reaching this descriptor by forcing and abusing the position of the link-layer "struct ifaddr" in the per-interface list, use the if_sadl pointer directly. ok mikeb@, henning@
2014-03-10When translating packets from one address family to another, pass theJeremie Courreges-Anglas
TOS/Traffic Class field of the original packet. Discussed with mikeb@
2014-03-10When setting up the packet description, also retrieve the Traffic ClassJeremie Courreges-Anglas
field of IPv6 packets. Issue reported by Christophe Heurtaux on frnog. ok mikeb@
2014-03-10if_lladdr -> if_sadl, no functional change.Martin Pieuchot
ok mikeb@
2014-02-17Convert bcopy()s to memcpy()s.Martin Pieuchot
ok pelikan@, tedu@
2014-02-13Replace hand crafted routing label code with the rtlabel_id2sa()Alexander Bluhm
function call. Name sockaddr_rtlabel variable sa_rl everywhere. OK mpi@ claudio@
2014-02-12Add rtlabel to rt_newaddrmsg, From: Florian Riehm <mail at friehm dot de>Henning Brauer
ok bluhm claudio
2014-02-12Remove an old and unused define that should not be used.Martin Pieuchot
2014-02-12Remove an old comment about bsdi4 and make it clear that netmasks areMartin Pieuchot
not needed for routes to host. ok bluhm@, claudio@
2014-02-04reduce the length of some pool names. ok deraadt guenther mpiTed Unangst
2014-01-27Make the amount of classes limited by 64k, with automatic table growing.pelikan
The limit is because in places, queue IDs are being stored as u_int16_t's. tested by me, discussed at length with (and ok) claudio henning
2014-01-25Simplify and shorten the way ICMP checksums are verified inLawrence Teo
pf_check_proto_cksum() by letting it use the same in4_cksum() call that is used for TCP and UDP checksums. ok henning@ naddy@
2014-01-24clearing the _CSUM_IN_OK flags is now utterly pointless, was only done forHenning Brauer
statistics sideeffects before. ok lteo naddy
2014-01-24in pf_check_proto_cksum, updtae the swcksum counters if we cksummed inHenning Brauer
software. ok naddy (this is pbly the ultimate commit'n'run)
2014-01-24computing the ip csum just before the bpf mtap and only if there is aHenning Brauer
consumer just to please tcpdump is stupid and not done anywhere else. kill with fire. ok benno
2014-01-23since the cksum rewrite the counters for hardware checksummed packetsHenning Brauer
are are lie, since the software engine emulates hardware offloading and that is later indistinguishable. so kill the hw cksummed counters. introduce software checksummed packet counters instead. tcp/udp handles ip & ipvshit, ip cksum covered, 6 has no ip layer cksum. as before we still have a miscounting bug for inbound with pf on, to be fixed in the next step. found by, prodding & ok naddy
2014-01-23Merge two chunks of code to inform listeners of a route change into aMartin Pieuchot
new function, rt_sendmsg(). While here, in the v6 cases, pass the same rtableid that was used for the request instead of dereferencing a pointer after checking for it to be NULL. ok krw@ on a previous version, ok bluhm@
2014-01-22Kill the RN_DEBUG code it is broken since rev 1.1 and not worth fixing.Claudio Jeker
OK mpi@ and krw@
2014-01-22Pass the receiving interface pointer to carp_input() instead of re-Martin Pieuchot
reading it from the packet header. While here makes carp_input() take the same arguments as ether_input(). ok bluhm@, 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-22one more absolutely obvious bcopy -> memcpyHenning Brauer
2014-01-227x bcopy -> memcpy, impossibility of overlaps verified. ok benno dlgHenning Brauer
2014-01-22do the tx and pfsync handlers only once on the way out of netisrDavid Gwynne
instead of in every loop. tested for a long time on many machines at work. ok henning@
2014-01-21Cleanup the abuse of x as the rn_addmask radix node. Since in mostClaudio Jeker
cases x is just used as a temp variable. Main offender is rn_addmask() which sets x once at the top uses it then late in the function and then starts reuing it for various other stuff. While there fix some for loops to while ones and fix one strange do { } while() loop. And since rn_search() can not return NULL remove one extra check. OK mpi@
2014-01-21allow pflow(4) to determine the src IP address based on the routeSebastian Benoit
table if flowsrc is not set. Now works with new udp checksum code. From Nathanael Rensen (nathanael.openbsd AT list DOT polymorpheus DOT com), tweak and ok florian@
2014-01-21Do not clean the multicast records of an interface when it is destroyedMartin Pieuchot
(unplugged). Even if it makes no sense to keep them around if the interface is no more, we cannot safely remove them since pcb multicast options might keep a pointer to them. Fixes a user after free introduced by the multicast address linking rewrite and reported by Alexey Suslikov, thanks! ok claudio@
2014-01-21Substitute crazy defines and convert some 0 to NULL.Martin Pieuchot
ok claudio@, henning@
2014-01-21introduce a way to match "any" interface, excluding loopback ones.Henning Brauer
pfi_kif_get annotates the kif with a flag indicating it is the "any" match pfi_kif_match obeys that flag ok benno
2014-01-20Remove an unneeded #ifndef bot radix.h and radix_mpath.h protect themselfClaudio Jeker
from multiple inclusion. OK mpi@
2014-01-20Try to be more consistent in how various variables are setup and named.Claudio Jeker
Also remove a memset that is already happeing because we use PR_ZERO on the allocation. Move two memmove to memcpy because the addrs can not overlap. Make some simple helper functions static __inline and remove one of the explicit rn_search inlines. OK mpi@
2014-01-20Get rid of the old routing message version 4 transition code beforeAlexander Bluhm
5.5 release. OK claudio@
2014-01-20tedu unused declaration. ok florian@Sebastian Benoit
2014-01-20support negated matches on the rcvif, ok dlg bennoHenning Brauer
2014-01-19Prettify; remove useless cast, reformat, fix TAILQ_FOREACH's.pelikan
No functional change. ok deraadt
2014-01-19RTF_MPATH is a flag userland needs to be able to pass in since it is usedClaudio Jeker
to set multipath routes. So since more then 2 month multipath was broken.
2014-01-19More cleanup in radix.c. Kill the rt_mkfreelist and replace it with aClaudio Jeker
radix_mask pool. With input and OK mikeb@ and henning@
2014-01-19Count the number of media words required only once. If the media wordsTheo de Raadt
change during M_WAITOK (note: no driver does this at the moment), then be careful to not copyout a truncated media word list, but return E2BIG. ok mikeb guenther kettenis
2014-01-19Start to reduce the madness in radix.c. This only used by the kernelClaudio Jeker
since ages so remove the bits used for userland compiles. OK mikeb@
2014-01-16Replaces a lookup to find the link-layer address by accessing the if_sadlMartin Pieuchot
member directly. ok mikeb@
2014-01-13Call all local valiables of type struct in6_ifaddr "ia6". This isAlexander Bluhm
consistent with struct ifaddr "ifa" and struct in_ifaddr "ia". OK mpi@
2014-01-12Remove no-op 'HIDE' macro from sppp code. This probably existed to allowStefan Sperling
for easy switching to static functions. But we don't usually have static functions in the kernel. ok deraadt mpi mikeb
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-08Name the local variables for struct ifaddr consistently "ifa".Alexander Bluhm
OK mikeb@
2014-01-08Perform manual malloc/free of a large object in pfkeyv2_send() toTheo de Raadt
reduce stack space requirements. ok mikeb mpi
2014-01-07Some follow-up fixes for IFID collision handling in IPv6CP.Stefan Sperling
Really change the link-local address in the unlikely event of an IFID collision, instead of going into an infinite conf-nak loop with the peer. To make the netinet6 code use the IPv6CP IFID in a new link-local address, in6_ifattach_linklocal() must accept a provided IFID. Replace the unused 'altifp' parameter with a new 'ifid' parameter for this purpose. Always use the latest suggested address in IPv6CP replies, even if the task to update the interface's address hasn't run yet. Also, clear the ifindex (KAME hack) in addresses sent during IPv6CP. ok mpi
2014-01-03Purging a queue requires it to be non-empty, not empty.pelikan
ok millert
2014-01-03Switch frequently allocated structs from malloc(M_DEVBUF) to separate pools.pelikan
ok henning, "looks fine" mikeb, input from guenther.