Page MenuHomeFreeBSD

inet6: Do not assume every interface has ip6 enabled
ClosedPublic

Authored by kp on Dec 11 2015, 7:49 PM.
Referenced Files
Unknown Object (File)
Wed, Apr 17, 5:59 AM
Unknown Object (File)
Wed, Apr 17, 5:50 AM
Unknown Object (File)
Mar 15 2024, 5:39 PM
Unknown Object (File)
Mar 15 2024, 5:36 PM
Unknown Object (File)
Dec 22 2023, 10:18 PM
Unknown Object (File)
Nov 21 2023, 7:43 PM
Unknown Object (File)
Nov 21 2023, 6:03 PM
Unknown Object (File)
Nov 11 2023, 2:29 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.