Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncated packets/IFF_NO_PI #1

Open
ebfe opened this issue Nov 10, 2014 · 1 comment
Open

Truncated packets/IFF_NO_PI #1

ebfe opened this issue Nov 10, 2014 · 1 comment

Comments

@ebfe
Copy link
Contributor

ebfe commented Nov 10, 2014

The documentation seems to disagree with the code with regards to the protocol information header on packets received from the kernel. ReadFrame suggests the the protocol information header is present "The buffer supplied must be large enough to hold the whole frame including a 4 byte header returned by the kernel.", though the interfaces are created with IFF_NO_PI, so the header is not present. Similarly the documentation claims to detect and report truncated packets via returning ErrTruncated but doesn't (and afaik isn't possible without looking at the protocol information header).

@davecheney
Copy link
Member

Honestly I tried it both ways, this was the only one that didn't corrupt
packets. I probably need to reduce the advertised mtu on the interface,
that will probably fix the problem.

On Mon, Nov 10, 2014 at 10:12 PM, ebfe notifications@github.com wrote:

The documentation seems to disagree with the code with regards to the
protocol information header on packets received from the kernel. ReadFrame
suggests the the protocol information header is present "The buffer
supplied must be large enough to hold the whole frame including a 4 byte
header returned by the kernel.", though the interfaces are created with
IFF_NO_PI, so the header is not present. Similarly the documentation claims
to detect and report truncated packets via returning ErrTruncated but
doesn't (and afaik isn't possible without looking at the protocol
information header).


Reply to this email directly or view it on GitHub
#1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants