summaryrefslogtreecommitdiff
path: root/sys/net
AgeCommit message (Collapse)Author
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-12No INET6 in ramdisk, fix the tree.Martin Pieuchot
2014-07-12/* this has no effect on IP, and will kill all ISO connections XXX */Henning Brauer
farewell, then. has been #ifdef notyet for the last 19 years
2014-07-12Always create a local route for every configured IPv4 address on theMartin Pieuchot
machine and restore the original behavior of RTM_ADD and RTM_DELETE by always generating one message per locally configured address. This time, make sure the local route is removed during an address change, since at least pppoe(4) do some funky magics with wildcard addresses that might corrupt the routing tree, as found by naddy@ Also do not add a local route if the specified address is 0.0.0.0, to prevent a tree corruption, as found by guenther@. Putting this in now so that it gets tested, claudio@ agrees. Please contact me if you find any route-related regression caused by this change.
2014-07-12sizeof(afh), afh being uint32, is cooler than literal "4"Henning Brauer
spotted by Kent R. Spillner <kspillner acm org>
2014-07-11"It's not the years, honey; it's the mileage."Ted Unangst
bluetooth support doesn't work and isn't going anywhere. the current design is a dead end, and should not be the basis for any future support. general consensus says to whack it so as to not mislead the unwary.
2014-07-11introduce the IFXF_AUTOCONF6 interface flag which controls wether weHenning Brauer
accept rtadvs on that interface. the global net.inet6.ip6.accept_rtadv sysctl just doesn't cut it, even tho the spec wants that - but in their little absurd world, a host just has one interface by definition anyway... the sysctlgoes away. lots of head scratching, brain cell elemination etc from bluhm benno stsp florian, excitement from simon and todd, ok bluhm stsp benno florian
2014-07-11Use uint32_t instead of uint16_t for pr_timeout_sec of structYASUOKA Masahiko
pipex_session_req.
2014-07-11switch from bpf_mtap to the shiny new bpf_mtap_stripvlan.Henning Brauer
bpf listeners on a vlan interface don't expect to see a vlan header (you expect those on the underlaying if). since we no longer prepend an ethernet header to later throw it away and prepend an ether_vlan_header, we prepend a ether_vlan_header right away. to unconfuse bpf listeners we need to cut the 4 extra bytes out, which is what bpf_mtap_stripvlan does. problem noticed by dlg with dhcrelay, ok benno dlg
2014-07-10time to claim copyrightHenning Brauer
2014-07-10some say you don't need NULL checks before free(). Not 0 either.Henning Brauer
2014-07-10introduce the revolutionary concept of NULL pointers. ok gccHenning Brauer
2014-07-10introduce bpf_mcopy_stripvlan, which cuts the 4 extra bytes out of theHenning Brauer
ether_vlan_header to make it a regular ether_header while copying into the bpf buffer. add bpf_mtap_stripvlan, which is a 1-line wrapper around _bpf_mtap passing this copy function in. ok benno
2014-07-10Simplify the way divert(4) sends packets to userspace: Instead ofLawrence Teo
unnecessarily allocating an mbuf tag to store the divert port, just pass the divert port directly to divert_packet() or divert6_packet() as an argument. includes a style fix pointed out by bluhm@ ok bluhm@ henning@ reyk@
2014-07-09Kill unused route storages.Martin Pieuchot
blambert@, henning@, lteo@
2014-07-09Add support bpfwrite on DLT_LOOP interfaces.YASUOKA Masahiko
ok guenther
2014-07-09Herr Reyk correctly pointed out that we don't need the if_pflog.h includeHenning Brauer
here any more
2014-07-09tedu bpf_mtap_pflog().Henning Brauer
now that it is a trivial wrapper around the extended bpf_mtap_hdr, we can use bpf_mtap_hdr directly. added benefit: pflog_bpfcopy doesn't need to be exported any more and can stay private to if_pflog.c ok benno bluhm reyk
2014-07-09bpf code surgery / shuffling / simplification.Henning Brauer
the various bpf_mtap_* are very similiar, they differ in what (and to some extent how) they prepend something, and what copy function they pass to bpf_catchpacket. use an internal _bpf_mtap as "backend" for bpf_mtap and friends. extend bpf_mtap_hdr so that it covers all common cases: if dlen is 0, nothing gets prepended. copy function can be given, if NULL the default bpf_mcopy is used. adjust the existing bpf_mtap_hdr users to pass a NULL ptr for the copy fn. re-implement bpf_mtap_af as simple wrapper for bpf_mtap_hdr. re-implement bpf_mtap_ether using bpf_map_hdr re-implement bpf_mtap_pflog as trivial bpf_mtap_hdr wrapper ok bluhm benno
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
2014-07-08pull the rx ring accounting out of the mbuf layer now that its all doneDavid Gwynne
via if_rxring things. this effectively deprecates the third argument for MCLGETI and m_clget and makes the mbuf layer no longer care about interfaces and simplifies the allocation paths. the timeout used to measure livelock has been moved to net/if.c. ok mpi@
2014-07-08introduce the if_rxr api. it is intended to pull the rx ring accountingDavid Gwynne
out of the mbuf layer, and break the assumption that an interface will only have a single ring per mbuf cluster size. mpi@ is ok with moving this forward
2014-07-02better indentation; no functional changeMike Belopuhov
2014-07-02u_int32_t's can't go negativeMike Belopuhov
2014-07-02better indentationMike Belopuhov
2014-07-01KASSERT() the correct node if a hint is passed to rn_delete().Martin Pieuchot
Fix a panic when trying to remove a route with the magical 0.0.0.0 destination. looks ok to claudio@
2014-06-30Attach HFSC after it's been completely initialized.Martin Pelikan
This fixes the "integer divide fault trap" bug caused by the second malloc skipping a beat and leaving the amount of allocated queues equal to zero. tested by me, ok henning mikeb
2014-06-26Calling in{6,}_purgeaddr() is not enough to remove an address fromMartin Pieuchot
an interface. Two other operations are performed when issuing a SIOCDIFADDR{_IN6,} ioctl: call the address hook and the per-driver ioctl function. Since carp(4) relies on an address hook to recalculate its hash, make sure to call this hook when IFXF_NOINET6 is set or when the rdomain is changed. ok henning@, mikeb@
2014-06-25pf_translate doesn't use the mbuf argument anymore.Mike Belopuhov
From Alexandr Nedvedicky <alexandr ! nedvedicky at oracle ! com>. Thanks!
2014-06-23turn of IPv6 for new interfaces by default. this really just means thereHenning Brauer
is no link-local address assigned by default, which - by default, since INET6 is in the GENERIC kernels - makes the machine and services on it reachable. No such thing in IPv4 land. since assigning an inet6 address manually or running rtsol(d) etc resets the NOINET6 flag and causes the link-local to be assigned, this really is a noop for all inet6 users with the exception of those ONLY using the default link-local address. These needs to run "ifconfig <if> inet6 eui64" or put the equivalent in hostname.if. discussed at length with many, ok at least by krw todd benno sthen
2014-06-16Revert "Always create a local route for every configured IPv4 address",Martin Pieuchot
it introduces a regression with default routes & p2p interfaces. Problem reported by naddy@
2014-06-13Instead of updating all the cluster allocation water marks of all theMartin Pieuchot
interfaces when the kernel is livelocked, only do it for the current pool and defer the other updates. This allow us to get rid of an interface list iteration in a critical path. Ridding the libc crank since this change introduce an ABI break. ok claudio@
2014-06-13KASSERT in pipex_ppp_input() fails if a compressed PPP frame is receivedYASUOKA Masahiko
by the pipex session whose mppe is not accepted. Fix ppp_common_input() to not pass such frames to pipex.
2014-06-13Fix KASSERT on pipex_ppp_input(). Must not reached there even if theYASUOKA Masahiko
tunneling protocol is PPPoE.
2014-06-13Fix tcp-mss-adjust of pipex and npppd to update the pointer ofYASUOKA Masahiko
tcp option and check the boundary correctly.
2014-06-11Always create a local route for every configured IPv4 address on theMartin Pieuchot
machine and restore the original behavior of RTM_ADD and RTM_DELETE by always generating one message per locally configured address. Tested by krw@, jca@ and florian@
2014-06-11Flag local routes as such and make them use the highest possibleMartin Pieuchot
priority. Tested by krw@, jca@ and florian@
2014-06-07g/c unused IFT_L2VLAN, ok reyk bluhmHenning Brauer
the #define stays since it's userland visible and who knows what uses it
2014-05-31Unbreak RTM_CHANGE. Unlike RTM_LOCK or RTM_GET it is OK to pass in aClaudio Jeker
new gateway for RTM_CHANGE if the route is not a multipath route. Fixes issues found by benno@, OK benno@
2014-05-27Big refactoring of the radix code (mainly rn_addroute but also partClaudio Jeker
of rn_delete was changed). The mpath code gets a much better rn_mpath_next() function that allows looping through the dupedkey list based on prio, any or only active routes. This solves the issues seen with failed deletes of down routes. Commit this now so that it gets tested. Both sthen@ and blambert@ agree.
2014-05-27Reserve the highest route priority for kernel-managed routes and preventMartin Pieuchot
userland from playing with the local and broadcast flags. ok claudio@
2014-05-26Document that this reference counter is not generic. It indicates howMartin Pieuchot
many route entries are pointing to this address.
2014-05-21Fix IPsec route addition broken since the removal of the link-layerMartin Pieuchot
addresses from the per-ifp list. While here document why enc(4) needs a link-layer address, or at least something that seems to be one. Found the hard way and fix tested by naddy@, ok mikeb@, henning@
2014-05-20Assign the queue ID to the correct packet header when sending ICMP messages.Martin Pieuchot
ok henning@
2014-05-16Do not put any link-layer address on the per-ifp lists or on the RB-Martin Pieuchot
Tree. Since interfaces only support one link-layer address accessible via the if_sadl member, there's no need to have it elsewhere. This improves various address lookups because the first element of the list, the link- layer address, won't necessarily be discarded. Finally remove the empty netmask associated to every link-layer address. This hack was needed to (ab)use the address & netmask comparison code to do a strcmp() on the interface name embedded in the sdl_data field. ok henning@, claudio@
2014-05-14improve style - basically, what my fingers did at Marrakesh airport whenHenning Brauer
waiting for the flight home from m2k14. ok reyk
2014-05-14There is no reason why one needs to have a lo(4) MTU that is arch specific.Claudio Jeker
Also making the size 32k + some extra is not very helpful since we don't do something like zerocopy or sendfile. Just go back to 32768 and we can bikeshed over the right value later on once we have features that benefit from it. OK mpi@
2014-05-13While Rev 1.285 fixed a RB tree corruption it caused a TAILQ corruptionClaudio Jeker
in the case where the rdomain was not switched. Make sure ifa_add() is only called if ifa_del() was called previously. Hopefully we got all the corruption fixed. With and OK mpi@
2014-05-09We should use the highest possible priority for routes to local addresses.Martin Pieuchot
Requested by claudio@
2014-05-08Introduce two new route flags: RTF_LOCAL and RTF_BROADCAST.Martin Pieuchot
Nothing use them for the moment, but here is the plan: Since a route lookup is always necessary to output a packet it makes sense to store all the information regarding how the packet should be sent in the routing entry. This will save us some expensive lookups on address lists. But once we have all the information about our addresses in the routing table, we can even use it in the input path with the hope that the number of lookups in the forwarding case can be reduce to one. ok henning@, chris@