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

adjust assert to allow trailing bytes #121

Closed
wants to merge 3 commits into from

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented Mar 30, 2015

@avsm
Copy link
Member

avsm commented Mar 31, 2015

@samoht it's now very hard to release tcpip since you seem to have the lock on it and have had it for a while... what needs to happen to merge this and unbreak ARM?

@avsm
Copy link
Member

avsm commented Mar 31, 2015

This one needs to merge, but I think it shouldn't be an assert. We should raise a proper exception or use some other functional callback to indicate we dropped the packet (in fact, the latter would be good: a ?drop_action that would be a logger or just an identity function to discard it)

@hannesm
Copy link
Member Author

hannesm commented Mar 31, 2015

I think due to it being very partial (there are lots of other potential out-of-bounds accesses, such as the split a few lines above), the assert can just be dropped. It would be good to have an interface which does not throw exceptions in a future tcp/ip release.

all over the code, checking a particular access is not productive.

instead, at some point in the future, the parsers should be refactored
and optionally produce packet values.  the goal is an exception-free
TCP/IP module
@hannesm
Copy link
Member Author

hannesm commented Mar 31, 2015

@samoht @avsm if you want to release TCP/IP + mirage, I'd be happy to back out mirage/mirage#390 (and wait to get conduit/tls/entropy for 2.4.7 then).

@avsm
Copy link
Member

avsm commented Mar 31, 2015

Let's not roll anything back. I'll cut a point release of tcpip with this fixed as a branch.

avsm added a commit that referenced this pull request Mar 31, 2015
Alternative fix for #121 to avoid raising Assert_failure

See also mirage/mirage-net-xen#24
@avsm
Copy link
Member

avsm commented Mar 31, 2015

v2.3.1 released. Everyone ok with a silent drop of the malformed frame in #122 instead of an assert?

@samoht
Copy link
Member

samoht commented Mar 31, 2015

We should at least print a debug message on the console when this happens.

@avsm
Copy link
Member

avsm commented Mar 31, 2015

No, we shouldn't. All such messages need to go to some logging service and not to the console (which is a denial of service very easily).

@hannesm
Copy link
Member Author

hannesm commented Apr 25, 2015

this is superseeded by changes in 2.3.1 / 2.4.1

@hannesm hannesm closed this Apr 25, 2015
@hannesm hannesm deleted the fix-assert branch April 25, 2015 15:28
samoht pushed a commit to samoht/mirage-tcpip that referenced this pull request Apr 4, 2017
Alternative fix for mirage#121 to avoid raising Assert_failure

See also mirage/mirage-net-xen#24
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

Successfully merging this pull request may close these issues.

3 participants