Page MenuHomeFreeBSD

Update ip_ecn to RFC 6040
Needs ReviewPublic

Authored by p.mousavizadeh_protonmail.com on Sat, Nov 1, 3:58 PM.
Tags
None
Referenced Files
F134707071: D53516.diff
Tue, Nov 4, 2:38 AM
F134657249: D53516.id.diff
Mon, Nov 3, 9:44 PM
F134657231: D53516.id165637.diff
Mon, Nov 3, 9:44 PM
F134656359: D53516.diff
Mon, Nov 3, 9:38 PM
Unknown Object (File)
Sun, Nov 2, 9:02 AM
Unknown Object (File)
Sat, Nov 1, 10:12 PM
Unknown Object (File)
Sat, Nov 1, 9:09 PM
Unknown Object (File)
Sat, Nov 1, 8:51 PM
Subscribers

Details

Summary

Update ecn tunneling functions to follow RFC 6040.
Add ECN_COMPLETE to support dangerous packet reporting
without causing extra cost to existing caller functions.

Update ECN_ALLOWED updated to follow the MUST requirements of RFC 6040.

Consumers can choose between ECN_COMPLETE and ECN_ALLOWED
based on their requirements.

Update IPv6 wrappers to use IPV6_FLOWLABEL_LEN to guide other developers.

Finally, return values are specified as macro to reduce
confusion, considering extra return values for ECN_WARN
and ECN_ALARM were added.

Note: these changes are necessary for the geneve (RFC 8926)
implementation.

Test Plan

I used scapy to verify expected results.
Below is a sample Scapy packet creation for ECN_DROP:

"IPv6(src='SRC_TUNNEL', dst='DST_TUNNEL', tc=3)/UDP(dport=6081,
    sport=54123)/GENEVE(proto=2048, vni=23)/IP(src='SRC_HOST',
    dst='DST_HOST', tos=0)/ICMP(type=8)"

You can test it with existing tunnel drivers that support ECN
such as gif(4) by applying IFF_LINK1 to make it ECN friendly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 68327
Build 65210: arc lint + arc unit