summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2013-11-21split kernel parts of the if.h into a separate header file if_var.hMike Belopuhov
which allows us to modify ifnet structure in a relatively safe way; discussed with deraadt, ok mpi
2013-11-21Remove unneeded include.Martin Pieuchot
ok deraadt@
2013-11-20Convert sppp(4) to taskq; ok mikeb@ mpi@Stefan Sperling
2013-11-19provide forward declarations for structures ifnet and ifg_group;Mike Belopuhov
ok deraadt
2013-11-19Remove some FDDI/ATM leftovers.Martin Pieuchot
ok mikeb@, henning@, deraadt@, brad@, miod@
2013-11-18Fix potential null dereference.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok benno@ henning@
2013-11-18The prio value of a pf match rule was overridden by a later passAlexander Bluhm
rule even if the latter had no prio flag. Fix match rules with prio to work as expected. Found by Roman Kravchuk; reported and tested by Alexey Suslikov; OK henning@
2013-11-18use arc4random() for ether_fakeaddr, because it is safeTheo de Raadt
ok tedu
2013-11-18Convert trunk(4) to use a detachhook, discussed at b2k13 with many.Martin Pieuchot
While here add a comment explaining detach hooks' order of execution when destroying/detaching an interface.
2013-11-17speelingDavid Gwynne
2013-11-16Remove dead assignments and now unused variables.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok henning@ mikeb@ bluhm@
2013-11-15calculate the line in the sand before comparing it to ticks, which looksDavid Gwynne
more like the original conditional. if this doesnt fix rd thrushs panic, then this should be reverted to r1.85.
2013-11-15Revert 1.858, as it causes panics of inp:Christiano F. Haesbaert
kernel diagnostic assertion \"sotoinpcb(inp->inp_socket) == inp\" failed: file "../../../../netinet/tcp_input.c", line 646 Will think of a better fix.
2013-11-15After discussion with deraadt@ and Fernando Gont, it seems that theAlexander Bluhm
stack should still scan for IPv6 type 0 routing headers. There are OpenBSD routers running without pf and there are plenty of legacy implementations supporting RH0. Bring back the function ip6_check_rh0hdr() that I removed a month ago. As an improvement to the prevoius solution, only scan the header chain in ip6_input() if the packet has not been inspected by pf. Both implementations drop packets with RH0 anywhere in the extension header chain. OK mikeb@ henning@
2013-11-15inherit the rdomain sc to pkthdrHenning Brauer
from erik at halon dot se, ok benno phessler benno
2013-11-15Forget socket linking on pf_pkt_addr_changed(), this fixes among otherChristiano F. Haesbaert
things, setups with ipsec+ifbound. The sympthon was that local IPSec packets (tunnel->tunnel) would not match state after the latest pf_find_state() changes. The first packet would go through, but the subsequent ones would fail the match and collide later with the existing state. ok henning@ markus@
2013-11-14Improvements for address assignment and related issues in IPv6CP.Stefan Sperling
Move address assignment to process context. This uses a workq at present, conversion to taskq is on my todo list (discussed with dlg). Instead of rummaging around in sockaddr_in6 structs, use the proper netinet6 APIs to configure addresses. Deal with IFID collisions instead of ignoring them. The whole point of IPv6CP is to avoid IFID collisions. Use arc4random() during IFID generation. Assign destination address to /128 point-to-point links. tested by me and sthen with pppoe(4) ok sthen
2013-11-13DIOCGETSRCNODES was leaking a little bit more kernel informationTheo de Raadt
ok benno
2013-11-12two ioctl's were disclosing kernel pointers and such.Theo de Raadt
ok henning benno
2013-11-12try bpf.c r1.84 again, this time without semantic changes to if statements.David Gwynne
cheers to sthen@ and krw@ for properly dealing with the fallout of my first commit.
2013-11-11Revert bpf.c 1.84 / bpfdesc.h 1.19 for now, "panic: timeout_add: to_ticks (-1)Stuart Henderson
< 0" seen by RD Thrush, http://article.gmane.org/gmane.os.openbsd.bugs/20113 where he has a long-running process using bpf which is active at the time of panic. krw@ agrees with reverting for now.
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-11replace the user of ticks in a condition like "interval + start < ticks"David Gwynne
with "ticks - start > interval" because the latter copes with the ticks value wrapping. pointed out by guenther@ ok krw@
2013-11-09ticks is compared against mcl_grown to see if time has elapsed sinceDavid Gwynne
the rx ring was last allowed to grow and then assigned to it. it is erroneous to do this because mcl_grown is a u_int and ticks is an int. this makes mcl_grown an int, and follows the idiom in kern_timeout.c of going "thing - ticks < diff", which better copes with ticks wrapping around and being used to calculate relative intervals. ok pirofti@ guenther@
2013-11-08To make sure detach hooks are executed in reverse order they were added,Martin Pieuchot
they must be appended to the head of the list. It doesn't really matter right now since most of our pseudo drivers use their own custom detach procedure, but teach vlan(4) to do the right thing since more conversion are coming. ok deraadt@
2013-11-07Now that it is safe to disestablish a hook from itself, do not leak theMartin Pieuchot
detach hook when the parent interface is destroy/removed. ok reyk@
2013-11-05Remove useless #ifdef *BSD cruft from sppp(4). No binary change.Stefan Sperling
ok sthen
2013-11-01push the queues every 1/HZ using timeout(9)pelikan
This is a modified version of oldtbr_timeout() with a timeout for each HFSC enabled interface. We can now safely include <sys/timeout.h> in net/hfsc.h without breaking the build. tested by naddy, ok henning claudio deraadt
2013-11-01keep net/hfsc.h away from userspace, except in pfctlpelikan
tested by naddy, ok deraadt
2013-11-01The old routing messages compatibility code did not work on strictAlexander Bluhm
alignment architectures. Use m_copydata() instead of mtod(). OK deraadt@
2013-11-01Send pflow(4) packets in the correct rdomain.Florian Obser
From Anders Berggren (anders AT halon DOT se), thanks. OK henning, benno
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-31revert previous, net/if.h exports bad things to userspace.pelikan
2013-10-31push the queues every 1/HZ using timeout(9)pelikan
This is a modified version of oldtbr_timeout() with a timeout for each HFSC enabled interface. ok henning claudio
2013-10-30Allow to compile a kernel without INET6.Martin Pieuchot
ok henning@
2013-10-30translate icmpv6 echo id's the same way we do for icmpv4; ok henningMike Belopuhov
2013-10-30add a comment describing why do we call pf_map_addr again if portMike Belopuhov
selection process fails; ok henning
2013-10-28Do not use the multicast macro IFP_TO_IA() to check if an interface hasMartin Pieuchot
a configured IPv4 address but iterates on its private list instead. ok deraadt@
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-28previous udp port number rewrite fix turned out to be a work aroundMike Belopuhov
the incorrect pf_change_ap call; while here make the tcp case use pf_change_ap since it shares the same properties. ok henning
2013-10-24Move more stuff under _KERNELTheo de Raadt
ok claudio
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-24Move obvious kernel prototypes (and structure's with kernel pointers,Theo de Raadt
obviously only used in the kernel) behind #ifdef _KERNEL
2013-10-23delete junk NRL v6 block; ok claudioTheo de Raadt
2013-10-23translate port numbers for inner udp packets when they're returnedMike Belopuhov
as a payload of icmp error messages; makes traceroute6 operate across a nat64 gateway. prompted by sthen, ok henning
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-23overwrite icmp packet type-specific nextptr field only when we'reMike Belopuhov
changing it. fixes an icmp to icmpv6 translation regression found by todd and sthen. ok henning sthen
2013-10-22In pf_test_state_icmp(), actually copy pd->hdr.any back into the mbuf asLawrence Teo
intended after the ICMP/ICMPv6 checksum is zeroed in pf_cksum(). This resolves an issue found by sthen@ where ICMP traffic with nat-to failed due to incorrect checksums. Fix tested by sthen@ and myself OK henning@
2013-10-22whitespaceReyk Floeter
2013-10-21nuke comment. How soon is now?Sebastian Benoit
"do it" deraadt@