|
Bugzilla – Full Text Bug Listing |
| Summary: | TapBridge address learning patch | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Tom Henderson <tomh> |
| Component: | tap-bridge | Assignee: | Tom Goff <tgoff> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | ns-bugs |
| Priority: | P5 | ||
| Version: | pre-release | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Attachments: |
Modified patch
Updated patch |
||
|
Description
Tom Henderson
2013-10-20 09:44:26 UTC
Created attachment 1690 [details]
Modified patch
I agree with the suggested changes but think the proposed patch can be
improved. The attached version includes the following modifications:
- maintain the current for-loop logic in CreateTap() where all
ancillary data is considered
- prefer AF_INET to PF_INET
- check that socket() succeeds
- prefer strncpy to strcpy
- use Mac48Address::CopyFrom() instead of an intermediate string
representation
- close the socket file descriptor when done
- include an error message if finding the mac address fails
- leave the SetAddress() logic in ForwardToBridgedDevice() unchanged
in case setting the mac address from CreateTap() fails for some
reason
- some style nits and trailing whitespace removed
It also remove comments related to NO_CREATOR because it doesn't seem
to be currently supported. This could be a separate patch.
Created attachment 1692 [details]
Updated patch
This is a slightly simplified version of the previous patch that uses
the existing unix domain socket instead of opening a new socket.
It also closes the unix domain socket when done.
pushed in changeset: 10432:7a23bec8c567 |