summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/icmp6.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Kill redundant or unused arguments in rtredirect().mpi2015-12-011-3/+2
| | | | ok bluhm@
* Use if_get() rather than dereferencing rt_ifp directly.mpi2015-11-211-7/+15
| | | | ok sthen@, visa@, sashan@, florian@
* Remove dead assignments.chl2015-11-031-2/+1
| | | | | | Found by LLVM/Clang Static Analyzer. ok bluhm@ mpi@
* Rename rtrequest1() to rtrequest().bluhm2015-10-301-2/+2
| | | | OK mpi@
* Remove linkmtu and maxmtu from struct nd_ifinfo. IN6_LINKMTU can nowflorian2015-10-281-2/+2
| | | | | die and ifp->if_mtu is the one true mtu. Suggested by and OK mpi@
* Inspired by satosin(), use inline functions to convert sockaddr dl.bluhm2015-10-221-2/+2
| | | | | | Instead of casts they check wether the incoming object has the expected type. So introduce satosdl() and sdltosa() in the kernel. OK mpi@
* Stop checking for RTF_UP directly, call rtisvalid(9) instead.mpi2015-10-191-2/+3
| | | | | | While here add two missing ``rtableid'' checks in in6_selectsrc(). ok bluhm@
* Do not manually decrement rt's refcounter in nd6_lookup() and let thempi2015-09-181-9/+8
| | | | | | callers rtfree(9) it. Inputs and ok bluhm@
* Bad whatever, that if_put() should not be there. Found the hard way by deraadt@claudio2015-09-111-2/+1
| | | | OK mpi@
* if_put after if_get when IP6_EXTHDR_GET fails in icmp6_input.dlg2015-09-111-1/+2
| | | | | | | claudio missed this one cos he was drunk while he was supposed to be fixing this file. ok claudio@ mpi@
* When pf modifies a TCP packet, it sets the M_TCP_CSUM_OUT flag inbluhm2015-09-111-3/+3
| | | | | | | | | | | | | | | | | the mbuf packet header. If the packet and is later dropped in ip6_forward(), the TCP mbuf is copied and passed to icmp6_error(). IPv6 uses m_copym() and M_PREPEND() which preserve the packet header. The inherited M_TCP_CSUM_OUT flag generates ICMP6 packets with an incorrect checksum. So reset the csum_flags when packets are generated by icmp6_reflect() or icmp6_redirect_output(). IPv4 does m_copydata() into a fresh mbuf. There m_inithdr() clears the packet header, so the problem does not occur. But setting the csum_flags explicitly also makes sense for icmp_send(). Do not or M_ICMP_CSUM_OUT to a value that is 0 because of some function calls before. OK mpi@ lteo@
* if_put for icmp6. Again we cheat a bit with the hop limit to simplify the code.claudio2015-09-111-12/+15
| | | | OK mpi@
* Kill yet another argument to functions in IPv6. This time ip6_output'sclaudio2015-09-111-3/+3
| | | | | | | ifpp - XXX: just for statistics ifpp is always NULL in all callers so that statistic confirms ifpp is dying OK mpi@
* in6_embedscope() needs to lose some weight. Remove the last argument.claudio2015-09-111-7/+5
| | | | | | | | | In all but two calls NULL is passed and in the other 2 cases the ifp is only used to maybe feed it to in6_selecthlim() to select the hoplimit for the link. Since in6_embedscope() only works on link-local addresses it does not matter what hop limit we select since the destination is directly reachable. OK florian@ mpi@
* It is time to put inet6 on a diet. Use the flensing knife and cut outclaudio2015-09-101-4/+4
| | | | | the 3rd argument of in6_recoverscope() and make it return void. OK dlg@ mikeb@
* Kill icmp6_ifstat_inc() and associated per-ifp storage.mpi2015-09-091-35/+3
| | | | | | The SIOCGIFSTAT_ICMP6 is no longer supported. ok dlg@, mikeb@, claudio@
* Implement pf divert-reply for raw sockets. Note that an emptybluhm2015-07-281-1/+4
| | | | | | | | | divert->addr means that the rule has a divert-reply option. With divert-to the divert->addr is always set. The divert-reply rules should compare the original packet with the socket addresses. So skip the step that compares the inp->inp_laddr with the empty divert->addr. OK mikeb@
* m_freem() can handle NULL, do not check for this condition beforehands.deraadt2015-07-151-16/+9
| | | | ok stsp mpi
* Pass an interface index instead of a pointer to in6_addr2scopeid().mpi2015-07-081-7/+7
| | | | ok millert@
* Get rid of the undocumented & temporary* m_copy() macro added formpi2015-06-301-2/+2
| | | | | | | | compatibility with 4.3BSD in September 1989. *Pick your own definition for "temporary". ok bluhm@, claudio@, dlg@
* Store a unique ID, an interface index, rather than a pointer to thempi2015-06-161-19/+21
| | | | | | | | | | | | | | | receiving interface in the packet header of every mbuf. The interface pointer should now be retrieved when necessary with if_get(). If a NULL pointer is returned by if_get(), the interface has probably been destroy/removed and the mbuf should be freed. Such mechanism will simplify garbage collection of mbufs and limit problems with dangling ifp pointers. Tested by jmatthew@ and krw@, discussed with many. ok mikeb@, bluhm@, dlg@
* More damned eye searing whitespace. No change to .o files.krw2015-06-081-5/+5
|
* Do not check if the interface index matches the scope when all we wantmpi2015-03-041-2/+2
| | | | | | | | | | | is to clear the damn embedded scope. At this point the receiving interface should not matter and will in the future be cleared to prevent such layer violations. This prevent exporting addresses with embedded scope to userland. Found the hardway by and ok florian@
* Convert various rtrequest1(RTM_DELETE,...) calls to rtdeletemsg(9).mpi2015-02-051-19/+3
| | | | | | This unify some code and notify userland for free. blambert@ agrees, ok bluhm@
* Revert rtdeletemsg conversion. It was not ok'd, I misunderstood bluhm@'smpi2015-01-281-3/+19
| | | | email.
* Call rtdeletemsg(9) instead of rerolling its code. As a bonus you'llmpi2015-01-261-19/+3
| | | | | | get userland notification for free. ok blambert@, bluhm@
* <netinet6/in6_ifattach.h> is not needed here.mpi2015-01-191-2/+1
|
* Make sure rtrequest1(9) is called under splsoftnet().mpi2014-12-221-1/+13
|
* Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.mpi2014-12-051-1/+2
| | | | ok mikeb@, krw@, bluhm@, tedu@
* Rename rtalloc1() into rtalloc(9) and convert its flags to only enablempi2014-11-011-3/+3
| | | | | | functionnality instead of a mix of enable/disable. ok bluhm@, jca@
* Use rtfree() instead of RTFREE(), NULLify some free'd route pointers andmpi2014-10-141-10/+8
| | | | | | kill the macro. ok mikeb@, henning@
* Nuke net.inet6.icmp6.rediraccept and allow redirects on interfacesflorian2014-08-271-2/+2
| | | | | | | with autoconf enabled. If one is doing SLAAC one does already trust link local icmp6 so the policy for icmp6 redirects should be the same. pointed out by & OK bluhm@; OK henning@
* Fewer <netinet/in_systm.h> !mpi2014-07-221-2/+1
|
* Remove rfc 4620 Node Information Query support (from the kernel).benno2014-07-111-797/+2
| | | | ok henning@ stu@, Yay! weerd@
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-081-4/+2
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* Remove some m->m_pkthdr.rcvif dereference to help for upcomingmpi2014-05-071-21/+24
| | | | | | receiving pointer -> index conversion. No functional change. ok chrisz@, jca@, mikeb@, lteo@
* Invert the signature logic of in{,6}_selectsrc, make them return thejca2014-04-181-7/+7
| | | | | | | | error code and pass the resulting source address back to the caller through a pointer, as suggested by chrisz. This gives us more readable code, and eases the deletion of useless checks in the callers' error path. Add a bunch of "0 -> NULL" conversions, while here. ok chrisz@ mpi@
* "struct pkthdr" holds a routing table ID, not a routing domain one.mpi2014-04-141-9/+9
| | | | | | | | | | | | | | Avoid the confusion by using an appropriate name for the variable. Note that since routing domain IDs are a subset of the set of routing table IDs, the following idiom is correct: rtableid = rdomain But to get the routing domain ID corresponding to a given routing table ID, you must call rtable_l2(9). claudio@ likes it, ok mikeb@
* rt_timer* spring cleanup.mpi2014-03-211-3/+3
| | | | | | | | | Rename and document rt_timer_count() into rt_timer_queue_count() to be consistent with the other functions. Remove unused argument from rt_timer_queue_destroy(), clean the definitions and finally use the same order in NAME and DESCRIPTION as requested by jmc@. ok henning@
* Instead of calculating the ICMPv6 checksum here, just set the flag thatnaddy2014-01-241-5/+3
| | | | | is needed and the lower parts of the stack will take care of it. ok henning@, lteo@
* Call all local valiables of type struct in6_ifaddr "ia6". This isbluhm2014-01-131-24/+24
| | | | | consistent with struct ifaddr "ifa" and struct in_ifaddr "ia". OK mpi@
* Propagate an rdomain number to the nd6_lookup independently frommikeb2014-01-071-2/+2
| | | | | the ifp pointer which can be NULL. This prevents a crash reported by David Hill <dhill at mindcry ! org>. OK bluhm
* Switch inpt_queue from CIRCLEQ to TAILQ. Thus ending use of CIRCLEQkrw2013-12-201-2/+2
| | | | | | | in the base. Ports fixes to follow shortly for the two ports (gkrellm and net-snmp) affected. ok zhuk@ millert@
* Replace most of our formating functions to convert IPv4/6 addresses frommpi2013-11-111-11/+27
| | | | | | | | network to presentation format to inet_ntop(). The few remaining functions will be soon converted. ok mikeb@, deraadt@ and moral support from henning@
* Significant namespace cleanup of netinet6 symbols.deraadt2013-10-241-7/+7
| | | | | | | | 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
* Back when some NRL code was merged into KAME to create the *BSD IPV6deraadt2013-10-231-60/+23
| | | | | | | | 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
* There are gasps of shock! Add a pmtu delay sysctl BUTTON for netinet6,deraadt2013-10-211-14/+6
| | | | | making the code the same as netinet4 along the way. ok bluhm phessler
* Sprinkle a lot more IPv6 routing domains support in the kernel.phessler2013-10-211-8/+10
| | | | | | | | | 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@
* The header file netinet/in_var.h included netinet6/in6_var.h. Thisbluhm2013-10-171-2/+2
| | | | | | | 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@
* If an ICMP packet gets diverted to a raw IP socket, if must not bebluhm2013-06-051-1/+22
| | | | | | | consumed by icmp_input(). As an exception, control packets that belong to a connection to a local socket must go to pr_ctlinput(). Add a switch over the ICMP type to handle that. OK markus@ henning@