summaryrefslogtreecommitdiff
path: root/sys/netinet
AgeCommit message (Collapse)Author
2014-01-09replace Bcopy macro with memmove and memcpy. ok mpiTed Unangst
2014-01-09bzero/bcmp -> memset/memcmp. ok matthewTed Unangst
2014-01-07Propagate an rdomain number to the nd6_lookup independently fromMike Belopuhov
the ifp pointer which can be NULL. This prevents a crash reported by David Hill <dhill at mindcry ! org>. OK bluhm
2013-12-31bcopy -> memcpy. reviewed with one fix from matthewTed Unangst
2013-12-20Switch inpt_queue from CIRCLEQ to TAILQ. Thus ending use of CIRCLEQKenneth R Westerback
in the base. Ports fixes to follow shortly for the two ports (gkrellm and net-snmp) affected. ok zhuk@ millert@
2013-12-17Change ip_output()'s non-optional arguments to be standard argumentsMatthew Dempsky
instead of variable arguments. Allows stricter type checking by the compiler at call sites and also saves a bit of code size on some platforms (e.g., ~200 bytes on amd64). ok mikeb
2013-12-04ifp must be initialized in ip_setmoptions; from oga via mpi, ok mpiMike Belopuhov
2013-11-29move in_multi definition into kernel-onlyTheo de Raadt
2013-11-28Change the way protocol multicast addresses are linked to an interface.Martin Pieuchot
Instead of linking multicast records to the first configured address of the corresponding protocol, making this address and its position in the global list special, add them to a new list directly linked to the interface descriptor. This new multicast address list is similar to the address list, all its elements contain a protocol agnostic part. This design allows us to be able to join a multicast group without necessarily having a configured address. That means IPv6 multicast kludges are no longer needed. Another benefit is to be able to add and remove an IP address from an interface without worrying about multicast records. That means that the global IPv4 list is no longer needed since the first configured address of an interface is no longer special. This new list might also be extended in the future to contain the link-layer addresses used to configure hardware filters. Tested by sthen@ and weerd@, ok mikeb@
2013-11-28Use the local variable referencing the receiving interface instead ofMartin Pieuchot
dereferencing the mbuf various times. No functional change. ok mpf@, bluhm@
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-27Replace INADDR_TO_IFP() by in_iawithaddr() and kill the macro.Martin Pieuchot
ok mikeb@, ports@, henning@
2013-11-27Let's call a rtableid a rtableid.Martin Pieuchot
ok mikeb@, henning@, claudio@
2013-11-26instead of calculating the icmp checksum here, just set the flag thatHenning Brauer
it is needed and the lower parts of the stack will take care of it. fixes a cksum bug in a rather constructed case and is just the right thing to do now. ok mpi naddy
2013-11-22Remove unused proc argument in in6_control().Martin Pieuchot
ok henning@, mikeb@
2013-11-21hide a bunch of structures (namely arpcom, llinfo_arp, ethernetMike Belopuhov
multicast macros and in_ifaddr) that reference ifnet in some way; looked over by deraadt, ok mpi
2013-11-21Remove unneeded include.Martin Pieuchot
ok deraadt@
2013-11-21Replace the last usage of IA_SIN() and kill this macro.Martin Pieuchot
ok henning@, sthen@, mikeb@, deraadt@
2013-11-17Instead of stripping the IP options manually in icmp_reflect(),Alexander Bluhm
just call ip_stripoptions(). Remove an unneeded parameter and adjust the ip length in ip_stripoptions(). from FreeBSD; OK deraadt@ henninh@ lteo@
2013-11-15Rename the struct pf_divert variable in divert_packet() andLawrence Teo
divert6_packet() from "pd" to "divert" to match the rest of the source. I think "pd" was not a good name for a struct pf_divert because "pd" usually refers to a pf_pdesc. No object file change. OK benno@ bluhm@ henning@
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-11-06See previous commit. This is the next step in the process. The code nowTheo de Raadt
accepts either format, but we start using the IETF bits. Hopefully we get a mail later again from David Dahlberg reminding us to remove the legacy acceptance.
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-27delete UPCALL_TIMING debug code from a the dark agesTheo de Raadt
2013-10-25Don't let in_proto_cksum_out() assume that the ICMP checksum field isLawrence Teo
always in the first mbuf of an mbuf chain. Thanks to henning@ and bluhm@ for their work on checksums at b2k13, which allowed this fix to be very straightforward compared to earlier versions. help/feedback bluhm@ henning@ OK henning@ naddy@
2013-10-24ippseudo is kernel-only; checked in ports by sthenTheo de Raadt
2013-10-24Remove the number of in6_var.h inclusions by moving some functions andMartin Pieuchot
global variables to in6.h. ok deraadt@
2013-10-24Significant namespace cleanup of netinet6 symbols.Theo de Raadt
One worrying bit is in icmp6.h where some htols() and htonl() are added, which may affect compatibility down the line. This component can be reverted if issues show up. Ports tree greps indicate no issue. ok claudio mpi etc
2013-10-24Move obvious kernel prototypes (and structure's with kernel pointers,Theo de Raadt
obviously only used in the kernel) behind #ifdef _KERNEL This is a more substantial change than the others commited minutes ago, so it is seperate. More structs get hidden. ok various
2013-10-23Back when some NRL code was merged into KAME to create the *BSD IPV6Theo de Raadt
stack (factoid: by a bunch of people in my living room), some compatibility #define's were created to shim incompatible inpcb access methods. There was an understanding they would eventually be removed. Since they are error prone, and 1999 is a long time ago, now they die. ok mikeb claudio mpi
2013-10-23remove historical #if 1Theo de Raadt
2013-10-23remove the ipprintfs debug stuff; if you are debugging at this level,Theo de Raadt
you probably write your own chunks as need be. ok mpi claudio
2013-10-23Remove the number of in_var.h inclusions by moving some functions andMartin Pieuchot
global variables to in.h. ok mikeb@, deraadt@
2013-10-23No need to expose twice in_socktrim(), it is only used in one file.Martin Pieuchot
2013-10-21Remove some historical comments.Theo de Raadt
2013-10-21There are gasps of shock! Add a pmtu delay sysctl BUTTON for netinet6,Theo de Raadt
making the code the same as netinet4 along the way. ok bluhm phessler
2013-10-21Sprinkle a lot more IPv6 routing domains support in the kernel.Peter Hessler
Mostly mechanical, setting and passing the rdomain and rtable correctly. Not yet enabled. Lots of help and hints from claudio and bluhm OK claudio@, bluhm@
2013-10-20Make the IPv4 and IPv6 code look similar to allow easy comparison.Alexander Bluhm
While there fix some white space errors. No functional change. OK claudio@ phessler@
2013-10-20no need to make the icmp cksum "offloading" case special insofar that theHenning Brauer
cksum needs to be 0'd before, pf does that now (just like in the tcp/udp case) and nothing else uses the icmp "offloading" yet. with & ok bluhm
2013-10-20Put a large chunk of the IPv6 rdomain support in-tree.Peter Hessler
Still some important missing pieces, and this is not yet enabled. OK bluhm@
2013-10-19Now carp_set_addr() and carp_set_addr6() break out of the loop afterAlexander Bluhm
they have found the interface address, so we can get rid of the additional variable ia_if. No functional change. OK mpi@ phessler@
2013-10-19remove confusing comments referencing the vaxTheo de Raadt
2013-10-19make in_proto_cksum_out not rely on the pseudo header checksum to beHenning Brauer
already there, just compute it - it's dirt cheap. since that happens very late in ip_output, the rest of the stack doesn't have to care about checksums at all any more, if something needs to be checksummed, just set the flag on the pkthdr mbuf to indicate so. stop pre-computing the pseudo header checksum and incrementally updating it in the tcp and udp stacks. ok lteo florian
2013-10-19In carp_set_addr6() break out of the loop after the interface addressAlexander Bluhm
has been found. This makes the IPv6 code work like IPv4. OK mpi@
2013-10-18In in_pcblookup() convert a hand crafted loop into a LIST_FOREACHAlexander Bluhm
macro. No binary change. OK mpi@
2013-10-18Abstract the fact that IPv4 muticast records are linked to theMartin Pieuchot
interface descriptor throught the first configured address in the global list, this will help reducing the size of future diffs. No object change. ok sthen@
2013-10-17The header file netinet/in_var.h included netinet6/in6_var.h. ThisAlexander Bluhm
created a bunch of useless dependencies. Remove this implicit inclusion and do an explicit #include <netinet6/in6_var.h> when it is needed. OK mpi@ 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-10-14Change the macros used to iterate over the multicast records of anMartin Pieuchot
interface to not depend on the global list of addresses. For IPv4 the IP_TO_IA() macro still depends on the global list of addresses because we want to be sure to grab the first configured address of an interface, where the records are linked. Tested by sthen@, ok henning@