summaryrefslogtreecommitdiff
path: root/sys/netinet
AgeCommit message (Collapse)Author
2016-01-31- m_pkthdr.pf.statekey changes are not ready for 5.9, I must back them outAlexandr Nedvedicky
OK sthen@
2016-01-25- plugging massive pf_state_key leakAlexandr Nedvedicky
OK mpi@ dlg@ sthen@
2016-01-22add a missing if_put() to ipip_input()Jonathan Gray
ok mpi@
2016-01-22fix a missing if_put() in the default af path of tcp_mss()Jonathan Gray
ok mpi@
2016-01-21Introduce in{,6}_hasmulti(), two functions to check in the hot path ifMartin Pieuchot
an interface joined a specific multicast group. ok phessler@, visa@, dlg@
2016-01-21remove the arp_inuse and arp_allocated countersDavid Gwynne
we can get the same info from the arp pool: # vmstat -m | grep -e ^arp -e ^Name Name Size Requests Fail InUse Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 56 84 0 6 1 0 1 1 0 8 0 Requests and InUse end up being the same: # pstat -d d arp_allocated arp_allocated at 0xffffffff81942084: 84 # pstat -d d arp_inuse arp_inuse at 0xffffffff81942098: 6 ok bluhm@ claudio@ mpi@
2016-01-14Grab the KERNEL_LOCK before delivering a message to the routing socketMartin Pieuchot
when an ARP resolution has been done. Should hopefully fix the "receive 1" panic reported by benno@ on bugs@. ok claudio@, phessler@, benno@, bluhm@
2016-01-13Prevent a double if_put().Martin Pieuchot
ok mikeb@, bluhm@
2016-01-12Prevent a NULL-reference if SIOCGVH is issued without carpdev argument.Martin Pieuchot
Problem reported by and diff tested by Fabian Raetz, thanks! ok benno@, bluhm@
2016-01-08Get rid of the arp and revarp input queues.Martin Pieuchot
Packets of types ARP and REVARP are now processed in the softnet task, directly from ether_input() and without holding the KERNEL_LOCK. Tested by many, ok dlg@
2015-12-19Make carp_output() mpsafe.Martin Pieuchot
This is needed in order to fully unlock ARP processing with carp(4) interfaces as found the hardway by sthen@. ok sthen@, dlg@
2015-12-18Fix SO_REUSE* flags effects when binding multicast addresses. NoVincent Gross
regression observed on avahi. ok benno@
2015-12-17rm a bit more trailers code. no longer accept them as alias for ethernet.Ted Unangst
ok mpi
2015-12-09Remove plain DES encryption from IPsec.Christian Weisgerber
DES is insecure since brute force attacks are practical due to its short key length. This removes support for DES-CBC encryption in ESP and in IKE main and quick mode from the kernel, isakmpd(8), ipsecctl(8), and iked(8). ok mikeb@
2015-12-09Keep all ether prototypes in one place.Martin Pieuchot
2015-12-09Always pass a valid interface pointer to rtdeletemsg().Martin Pieuchot
This will allows for stricter checks inside rtdeletemsg() and it should be up to the caller to decide if the route needs to be deleted or not. ok vgross@
2015-12-05upgrade tcp/ip to use the latest in C89 technology: memcpy.Ted Unangst
ok henning
2015-12-03Get rid of rt_mask() and stop allocating a "struct sockaddr" for everyMartin Pieuchot
route entry in ART. rt_plen() now represents the prefix length of a route entry and should be used instead. For now use a "struct sockaddr_in6" to represent the mask when needed, this should be then replaced by the prefix length and RTA_NETMASK only used for compatibility with userland. ok claudio@
2015-12-03deleting ip_insertoptions() prototype, which is no longer neededAlexandr Nedvedicky
(follow up on my earlier commit) OK bluhm@
2015-12-03ip_send()/ip6_send() allow PF to send response packet in ipsoftnet task.Alexandr Nedvedicky
this avoids current recursion to pf_test() function. the change also switches icmp_error()/icmp6_error() to use ip_send()/ip6_send() so they are safe for PF. The idea comes from Markus Friedl. bluhm, mikeb and mpi helped me a lot to get it into shape. OK bluhm@, mpi@
2015-12-03Use SRPL_HEAD() and SRPL_ENTRY() to be consistent with and allow toMartin Pieuchot
fallback to a SLIST. ok dlg@, jasper@
2015-12-03add ifdef IPSEC for protoypes; requested by mpi@Markus Friedl
2015-12-03factor out ip_input_ipsec_{fwd,ours}_check(); ok mpi@Markus Friedl
2015-12-03Remove broadcast matching from ifa_ifwithaddr(), use in_broadcast() whereVincent Gross
required. ok bluhm@ mpi@.
2015-12-03To avoid that the stack manipules the pf statekeys directly, introduceAlexander Bluhm
pf_inp_...() lookup, link and unlink functions as an interface. Locking can be added to them later. Remove the first linking at the beginning of tcp_input() and udp_input() as it is not necessary. It will be done later anyway. That code was a relict, from the time before I had added the second linking. Input from mikeb@ and sashan@; OK sashan@
2015-12-03remove some unused defines. ok mikebTed Unangst
2015-12-03Implement etherip(4) driverKazuya Goda
This commit is not removing the existing EtherIP part of gif(4) and it keeps EtherIP of gif(4) working. ok jbg@ sthen@ mpi@ reyk@ yasuoka@
2015-12-03rm unused kernel only IPV6_RECVRTHDRDSTOPTS sockopt. ok deraadt sthenTed Unangst
2015-12-03Rename pf_unlink_state() to pf_remove_state() so the name does notAlexander Bluhm
collide with the statekey to inp unlinking. OK sashan@ mpi@
2015-12-02Move port picking away from in_pcbbind()Vincent Gross
ok sthen@
2015-12-02Since we want to print the interface names in the log messages it isClaudio Jeker
required to do the if_get/if_put dance around the log() calls. These were the last users of rt_ifp. OK mpi@ bluhm@
2015-12-02More rt_ifp killing. There checks in in_arpinput() to verify that theClaudio Jeker
arp packet was recieved on the interface we expected. This is because multicast and broadcast packets are sometimes forwarded on multiple local interfaces. So simplify the checks and make them more generic at the same time (in the SIN_PROXY case). For SIN_PROXY only the interface holding the proxy arp route will answer to the requests. OK mpi@
2015-12-02factor out ip_output_ipsec_{lookup,send}(); with & ok claudio@Markus Friedl
2015-12-02There is no reason for this carp magic in arpresolve. rt->rt_ifp has toClaudio Jeker
be the same as ifp or something is very broken. So remove this including one more rt_ifp. OK mpi@
2015-12-02When destroying an interface, we have to wait until all referencesAlexander Bluhm
are not used anymore. This has to be done before any interface fields become invalid. As the route delete request cannot call if_get() anymore, pass down the interface. Split rtrequest_delete() into a separate function that may take an existing inteface. OK mpi@
2015-12-02- hide PF internals to pf_unlink_divert_state() from in_pcb.cAlexandr Nedvedicky
OK mpi@, bluhm@
2015-12-02Kill the RT_REPORT flag to rtalloc() and stop sending RTM_MISS messagesClaudio Jeker
for failed route lookups. This is something that was maybe useful in the 90is but in this modern times it is just annoying and nothing expect it anyway. OK mpi@, sthen@
2015-12-02Do not delete a conflicting & cloned route entry in the hot path.Martin Pieuchot
Deleting a RTF_CLONED entry without deleting its corresponding RTF_CLONING entry wont help as it will be cloned the next time arplookup() is executed. ok claudio@
2015-12-02Rework the MPLS handling. Remove the lookup loops since nothing is usingClaudio Jeker
them and they make everything so much harder with no gain. Remove the ifp argument from mpls_input since it is not needed. On the input side the lookup side is modified a bit when it comes to BOS handling. Tested in a L3VPN setup with ldpd and bgpd. Commiting now so we can move on with cleaning up rt_ifp usage. If this breaks L2VPN I will fix it once reported. OK mpi@
2015-12-01Kill redundant or unused arguments in rtredirect().Martin Pieuchot
ok bluhm@
2015-12-01Remove backward compatibility for "older version of routed and gated".Martin Pieuchot
ok millert@, bluhm@
2015-12-01typo in commentmmcc
2015-11-29Fix an hypotetical NULL dereference which might become true once the TCPMartin Pieuchot
layer will be turned mpsafe. We're not there yet. Reported by David Hill, ok florian@
2015-11-26Use rtalloc(9) to look for a local address (RTF_LOCAL) in ip_setmoptions().Martin Pieuchot
This simplifies the if_get()/if_put() dance. Tested by jasper@
2015-11-24Merge three #ifdef _KERNEL blocks into one.Martin Pieuchot
2015-11-24No need for <net/if_types.h>Martin Pieuchot
As a bonus this removes a "#if NCARP > 0", say yeah!
2015-11-23Use if_get() rather than rt_ifp.Martin Pieuchot
ok sashan@
2015-11-21Use if_get() rather than dereferencing rt_ifp directly.Martin Pieuchot
Inputs from and ok florian@, ok sthen@, visa@, sashan@
2015-11-20This no longer depends on bridge.h, fewer "#ifdef NBRIDGE", say yeah!Martin Pieuchot
2015-11-20Fewer uses of rt_ifp.Martin Pieuchot
Tested by and ok sthen@,