linux: GRE inject dest, collect-md send, and neighbor dump - #54
Merged
Conversation
Linux ipgre_header() copies sll_addr into the outer IP destination even when sll_halen is 0. A zeroed sockaddr_ll therefore overwrites a configured GRE remote (including a multicast one) with 0.0.0.0 and the kernel drops the packet. Use the IPv4 IFLA_GRE_REMOTE learned at Open() so inject onto a multicast-remote GRE tunnel encapsulates to that group. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Add ProtoNet::GetInterfaceNeighbors() and IFACE_NEIGH_NEW/DELETE monitor events so callers can track overlay dest and GRE lladdr (underlay). Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
type gre external (IFLA_GRE_COLLECT_METADATA) has no header_ops, so PF_PACKET SOCK_DGRAM never attaches lwtunnel metadata. The kernel drops the inject even when sll_addr holds a mapped unicast remote. Ordinary GRE/mGRE is unchanged: one Send() still means one dest. Detect collect-md via GetInterfaceType(), open a send-only IPPROTO_GRE socket, and send a 4-byte GRE header plus the inner IP to tunnel_remote_addr. Overlay unicast on these devices still uses kernel lwtunnel routes; this path is for SMF inject after map has set the remote. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
PF_PACKET cannot emit a multicast sll_addr on remote 0.0.0.0. Use a raw GRE socket for those dests; multicast-underlay mGRE (kernel remote already the group) stays on PF_PACKET. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
mGRE wildcard devices report 0.0.0.0 as the configured remote. Stash the PF_PACKET sll_addr from each Recv() so nrlsmf can tell which neighbor sent an EM_ACK. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
windows-latest now ships VS 2026, so the hardcoded VS 2022 vcvars64.bat path is gone. Locate the toolchain with vswhere and invoke it via cmd. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
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.
No description provided.