Summary: | feature wish: reply_from_interface and reply_src sysctl for IPv6 | ||
---|---|---|---|
Product: | Base System | Reporter: | Gert Doering <gert> |
Component: | kern | Assignee: | freebsd-net (Nobody) <net> |
Status: | New --- | ||
Severity: | Affects Only Me | CC: | ae, nc |
Priority: | --- | Keywords: | feature, ipv6 |
Version: | Unspecified | ||
Hardware: | Any | ||
OS: | Any |
Description
Gert Doering
2020-05-26 11:24:13 UTC
Our IPv6 implementation uses source address selection algorithm defined in RFC3484. You have some abilities to modify default source address selection by using policies or prefer_source flag. Is it not enough for what you want? No, as RFC3484 / RFC6724 do not take context into account ("packet comes in on em0, so use em0 source for the ICMP error packet, even if we intend to send the packet via em3"). I do not want *all* packets generated from this machine to use the "em0" source (so, not for outgoing TCP, for example), just generated ICMPs in reply to packets coming in on "em0". Like, exactly what the v4 stack can be told to do :-) I'm interested on working on this feature. If you want this feature, I have a Phabricator review here: https://reviews.freebsd.org/D25181 Can I test this with a 12.1-RELEASE source tree, or do I need CURRENT? I wrote this patch on CURRENT. You might be able to backport this to 12.1 if you wanted. Try applying the patch to 12.1 if you prefer, and if it fails, then try CURRENT. Compiled a CURRENT world + kernel (this VM is not exactly fast,so it took all night). Tested on the router VM it is for, and found that it works "mostly", but all ICMP packets are created with hlim=0. Commented in more detail in the Phabricator. |