A router answers for every address it holds, on the port the request arrived on (#1223) #1368
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1368
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/address-answers-any-port"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ported from GitHub PR #1280, which was authored before the 2026-11-09 migration, never rebased, and has sat
open since. Closes #1223.
The defect
An ICMP echo addressed to an address the router holds on another port was answered out of the port that owns
the address, not the port the request arrived on. When that port has no cable — the normal case when the request
comes from the far side of the box — the reply went nowhere and the host saw silence. From the host it looked as
if the router did not hold the address at all:
ownsIpOn()answers will I serve this address on this interface. Delivery needs do I hold it at all, askedfirst — the function conflated the two.
The fix
Device.holdsIp(ip)— the stack-ownership question, distinct fromownsIpOn()'s service question._handleLocalIp()replies out of the ingress interface, which is the way back to the sender. A taggedsubinterface keeps its exception: the request arrived tagged on the parent port, so the subinterface replies.
Ported onto today's
mainrather than merged as-is: the branch carries two days of drift, and the rebase neededone hand resolution where
mainhad since addedmacForIp()for VRRP virtual MACs — both methods now exist.Evidence
test/address-ownership.test.js— 24 checks: a router holds its own addresses on every port, the far-sideaddress answers, the reply leaves the port the request arrived on, a tagged child keeps its encapsulation, and the
negative cases (an address the box does not hold is still forwarded, not answered).
engine/simulator.jshunk → 2 of 24 fail (out of the port the request arrived on (expected "Gi0/0", got "Gi0/1"))vrrp94/94,vrrp-in-path49/49,show-vrrp-election27/27,routes-agreement19/19,flow91/91Suite: 187 suites, 7,235 assertions, 0 failed. Syntax: 255 files, OK.
no vlan 20deletes a VLAN that a port is still staged for as its voice VLAN #1701no vlanrefuses a VLAN a port holds as its staged voice VLAN #1705