summaryrefslogtreecommitdiff
path: root/sys/netinet
AgeCommit message (Collapse)Author
2008-06-28no EOL between tcpsig and sack headers; ok jsing, frantzenMarkus Friedl
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-06-14make easier to read, found during a bug hunt earlierTodd T. Fries
ok bluhm@
2008-06-14Include "faith.h" in order to get NFAITH. Also clean up NFAITH conditionalsJoel Sing
whilst we're here. ok henning@ deraadt@
2008-06-14add carppeer; an option to specify a different multicast address orReyk Floeter
even the unicast address of the remote carp peer. this especially helps when the multicast carp advertisements are causing problems in the network (some crappy switches don't do well with multicast), there are conflicts with VRRP, or the policy of the network does not allow multicast (most Internet eXchange points didn't allow carped OpenBGP routers because of the multicast advertisements). discussed with many ok mpf@
2008-06-14ANSIfy function definitions.Joel Sing
ok markus@
2008-06-14Include "pf.h" so we get NPF.Joel Sing
ok reyk@
2008-06-13Do not log carp state transitions from or to INIT by default.Marco Pfatschbacher
Reduces the amount of dmesg noise. Tested and OK mcbride@
2008-06-12Remove some crazy #if mess.Joel Sing
ok markus@ henning@
2008-06-12ANSIfy function definitions.Joel Sing
ok markus@ mcbride@ henning@ deraadt@
2008-06-12Fix type difference between function prototype and implementation.Joel Sing
According to millert@ this would have been promoted from a short to an int anyway, since K&R C cannot pass variables that are smaller than an int. ok deraadt@ millert@
2008-06-110 -> PR_NOWAIT (which is defined as 0) in pool_getBret Lambert
as an aid to readability ok and thinko-catching henning@
2008-06-11fix an old typo that prevented outer ipv6 headers from being corrected,Can Erkin Acar
also fix the correction amount. This was only really visible on tcpdump, as a "truncated-ip6 - 48 bytes missing" warning. The inner packet made it into the stack just fine, minus a few sanity checks. reported by and debuged together with and ok todd@
2008-06-10encapsulating v4 in v6 IPSec should not be so fun,Todd T. Fries
do not process v4 headers as v6, 255 TTL + icmp (0x01) = ff01:: suddenly, eww! debugged with bluhm@, verified by grunk@, ok markus@
2008-06-09rename arc4random_bytes => arc4random_buf to match libc's nicer name;Damien Miller
ok deraadt@
2008-06-08When adding PMTU related routes to the table inherit the priority form theClaudio Jeker
parent instead of using RTP_DEFAULT. OK henning@
2008-06-08alloc ipq's for fragment reassembly from a pool instead of usingThordur I. Bjornsson
malloc(); ok henning@ some time ago
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-06-04adderss -> addressMiod Vallat
2008-05-24Remove {tcp/udp}6_usrreq(); Since the normal ones nowThordur I. Bjornsson
take a proc argument, theres no need for these, since they are just wrappers. OK claudio@
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-19Unbreak builds for kernels that have atm interfaces. Found the hard way byClaudio Jeker
Theo on an alpha ramdisk. OK deraadt@
2008-05-15divert for ipv6; ok henning, pyrMarkus Friedl
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-05-09should check for null pointers; from henning@Markus Friedl
2008-05-09IP_RECVDSTPORT, allows you to get the destination port of UDP datagramsMarkus Friedl
for pf(4) diverted packets; based on patch by Scot Loach; ok beck@
2008-05-09Add SO_BINDANY socket option from BSD/OS.Markus Friedl
The option allows a socket to be bound to addresses which are not local to the machine. In order to receive packets for these addresses SO_BINDANY needs to be combined with matching outgoing pf(4) divert rules, see pf.conf(5). ok beck@
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-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-06Use the standard syslog levels on CARP logging messages instead ofRyan Thomas McBride
simple on/off, allowing more control over how verbose the logging is. This also allows you to do a further level of filtering in syslog.conf if you need to. Also add logging of state changes, inspired by diff provided by Brian A. Seklecki in PR 5513. These messages are logged by default. ok henning mpf deraadt
2008-05-06remove tcp_drain code since it's not longer used; ok henning, feedback thibMarkus Friedl
2008-05-02Make the SO_TIMESTAMP sockopt work. When set, this allows the user toChris Kuethe
get a timestamp of when the datagram was accepted (by udp(4), for example) rather than having to take a timestamp with gettimeofday(2) when recv(2) returns - possibly several hundreds of microseconds later. May be of use to those interested in precision network timing schemes or QoS for media applications. Tested on alpha, amd64, i386 and sparc64. manpage suggestions from jmc, ok deraadt
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-18extend the if_ethersubr.c crc functions to support updating a runningDamien Miller
crc in addition to the existing "oneshot" mode and use them to replace ieee80211_crc_update() with the new ether_crc32_le_update(). Saves 1k kernel bss + some code. Mark the new ether_crc32_[lb]e_update functions as __pure for a ~25x speedup (on my i386 at least). feedback and ok damien@
2008-04-18use arc4random_uniform() for random number requests that are not aDamien Miller
power of two. use arc4random_bytes() when requesting more than a word of PRNG output. ok deraadt@
2008-03-15revert - I'm a dumbfuck who doesn't know his own APIDamien Miller
2008-03-15off by one at end of arrayDamien Miller
2008-03-15Because the ip_id code initialisation is a specific case of shufflingDamien Miller
a set of incrementing integers (and not an arbitrary set of values) it is possible to populate the array as we shuffle it in a single forward pass. Clever optimisation from didickman AT gmail.com; ok deraadt@ mcbride@
2008-03-02because arc4random_uniform is being used, the modulo bias is taken care ofTheo de Raadt
2008-03-02Add a arc4random_uniform() that returns a uniformly distributed numberDamien Miller
in the range 0 <= x < upper_bound Please use this new API instead of "arc4random() % upper_bound", as it avoids the "modulo bias" that favours small results when upper_bound is not a power of two. feedback deraadt@ mcbride@; ok deraadt@
2008-02-29replacement algorithm. initialize a 64K-short buffer using DurstenfeldTheo de Raadt
shuffle. Upon allocation, swap-permute the new value to a random slot in the 0..32K-1 th entry of the buffer as we move forward, ensuring randomness but also satisfying the non-repeating property we need. Also avoid the value of 0, since IP ID's of 0 are special. Inspired by Dillon's implementation. We believe this is easier to read though, initializes with less bias, handles the ID of 0 properly, and wins speed tests. Thanks a lot to mcbride and djm for doing a bunch of statistical and speed analysis, and comments from nordin ok mcbride djm
2008-02-20Add my copyright.Marco Pfatschbacher
OK mcbride@, mickey@
2008-02-20remove old unused TCP isn code; ok henning, dhartmei, mcbrideMarkus Friedl
2008-02-20when creating a response, use the correct TCP header instead ofMarkus Friedl
relying on the mbuf chain layout; with claudio@ and krw@; ok henning@
2008-02-11The TCP server has to recalculate the client's window size takenAlexander Bluhm
from the first ACK packet. Otherwise the server would use the unscaled window size for the fist data it is sending. ok markus@ dhartmei@
2008-02-05Move carp load balancing (ARP/IP) to a simpler configuration scheme.Marco Pfatschbacher
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@.
2008-01-02return with ENOTTY instead of EINVAL for unknown ioctl requests.Brad Smith
ok claudio@ krw@ dlg@
2007-12-30A struct rt_addrinfo is needed for rt_missmsg() so we can use rtrequest1()Claudio Jeker
directly instead of takeing the detour via rtrequest(). OK henning@ markus@