linux-cp: fix interface ipip parser in xfrm-nl plugin - #49
Closed
like-a-bus wants to merge 1 commit into
Closed
like-a-bus wants to merge 1 commit into
like-a-bus wants to merge 1 commit into
Conversation
The interface type parser in lcp_xfrm_itf_pair_config() only handled 'interface ipsec' and silently ignored 'interface ipip', causing the plugin to always create ipsec-itf even when ipip was requested in startup.conf. Additionally, the original parser used 'unformat ... %s' which returns a vec without null-terminator, making clib_strcmp() comparisons unreliable. This patch replaces the parser with direct unformat literals for both ipsec and ipip variants. This fixes the missing ipip handling and removes the vec/cstring ambiguity. Unused 'tunnel_name' variable is also dropped. Tested with strongSwan 5.9.13 + linux-xfrm-nl in route-based mode. IPIP tunnel is correctly created on NEWSA notification and IPsec encryption verified via packet trace (esp4-encrypt-tun node) and pcap capture on the WAN interface.
|
Thank you so much for your interest! VPP takes patches at https://gerrit.fd.io/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The interface type parser in lcp_xfrm_itf_pair_config() only handled 'interface ipsec' and silently ignored 'interface ipip', causing the plugin to always create ipsec-itf even when ipip was requested in startup.conf.
Additionally, the original parser used 'unformat ... %s' which returns a vec without null-terminator, making clib_strcmp() comparisons unreliable.
This patch replaces the parser with direct unformat literals for both ipsec and ipip variants. This fixes the missing ipip handling and removes the vec/cstring ambiguity. Unused 'tunnel_name' variable is also dropped.
Tested with strongSwan 5.9.13 + linux-xfrm-nl in route-based mode. IPIP tunnel is correctly created on NEWSA notification and IPsec encryption verified via packet trace (esp4-encrypt-tun node) and pcap capture on the WAN interface.