Page MenuHomeFreeBSD

inet6: Do not assume every interface has ip6 enabled
ClosedPublic

Authored by kp on Dec 11 2015, 7:49 PM.
Referenced Files
F102920462: D4522.id.diff
Mon, Nov 18, 6:23 PM
F102919439: D4522.id.diff
Mon, Nov 18, 6:04 PM
Unknown Object (File)
Mon, Nov 18, 1:56 AM
Unknown Object (File)
Sun, Nov 17, 9:26 PM
Unknown Object (File)
Mon, Nov 11, 7:33 AM
Unknown Object (File)
Mon, Nov 11, 7:04 AM
Unknown Object (File)
Oct 5 2024, 6:19 AM
Unknown Object (File)
Sep 26 2024, 3:13 PM

Details

Summary

Certain interfaces (e.g. pfsync0) do not have ip6 addresses (in other words,
ifp->if_afdata[AF_INET6] is NULL). Ensure we don't panic when the MTU is
updated.

pfsync interfaces will never have ip6 support, because it's explicitly disabled
in in6_domifattach().

PR: 205194

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp retitled this revision from to inet6: Do not assume every interface has ip6 enabled.
kp updated this object.
kp edited the test plan for this revision. (Show Details)
kp set the repository for this revision to rS FreeBSD src repository - subversion.
kp added a project: network.
melifaro added a reviewer: melifaro.

According to the summary, it looks ok. Ensuring entire inet6/ code would work in all similar cases require (probably much) more work :)

sys/netinet6/in6.c
2427 ↗(On Diff #11143)

Well, the function is supposed to return MTU value. 46 is definitely better than panic, but It would probably be better to return ifp->if_mtu.

This revision is now accepted and ready to land.Dec 11 2015, 9:13 PM
sys/netinet6/in6.c
2427 ↗(On Diff #11143)

You're quite right. We should do what the caller (if_getmtu_family()) does if it can't get a better answer and return ifp->if_mtu.

kp updated this object.
kp edited edge metadata.
This revision now requires review to proceed.Dec 11 2015, 10:17 PM
melifaro edited edge metadata.
This revision is now accepted and ready to land.Dec 14 2015, 9:25 AM
hrs added a reviewer: hrs.
This revision was automatically updated to reflect the committed changes.