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

Fix tunslip6 #1304

Merged
merged 2 commits into from
Oct 23, 2015
Merged

Fix tunslip6 #1304

merged 2 commits into from
Oct 23, 2015

Conversation

simonduq
Copy link
Member

This PR reverts 6608b62 which seems to break tunslip6 at least for examples/ipv6/rpl-border-router. It also disables by default the IP address inquiry option, not supported by the BR.

@simonduq simonduq added the bug label Oct 13, 2015
@mcr
Copy link
Contributor

mcr commented Oct 13, 2015

Could you please detail how rpl-border-router is broken? It is precisely that example that needs this.

@simonduq
Copy link
Member Author

The symptom is that on linux you get

tunslip6: serial_to_tun: write: Invalid argument
ifconfig tun0 down
netstat -nr | awk '{ if ($2 == "tun0") print "route delete -net "$1; }' | sh
make: *** [connect-router] Error 1

(was reported to me by two different people and I could reproduce).

I didn't dig enough to fully understand why this occurs but the problem I noticed is that with the new conditionals, https://github.com/contiki-os/contiki/blob/master/tools/tunslip6.c#L275 is reached even if uip.inbuf[0] == DEBUG_LINE_MARKER or is_sensible_string(uip.inbuf, inbufptr) (unwanted behavior I believe).

The other problem fixed here is that tunslip6 kept sending ?IPA to which the BR replied Got request message of type I without taking any further action

@mcr
Copy link
Contributor

mcr commented Oct 13, 2015

I will retest things this week: I have been running the code for two years without those problems (on Linux).

@simonduq
Copy link
Member Author

OK, thanks! I hope you can reproduce the same issue.

@fvdnabee
Copy link

I also experienced tunslip6 being broken in exactly the same way as Simon. I didn't manage to diagnose the problem (a work around I found was setting verbose > 2).
So, I tested commit 30f69b0 (in cooja with one z1 rpl-border-router) and tunslip6 doesn't crash with "tunslip6: serial_to_tun: write: Invalid argument" and is working fine.

Also, +1 for commit a9a46b2 as per the reference to PR #676.

@bkozak-scanimetrics
Copy link
Contributor

I've also been seeing this exact same problem since 6608b62. Also, since this commit I'm seeing a lot of the following.

*** dropping large 2000 byte packet

@simonduq
Copy link
Member Author

@mcr, any news? More and more people are reporting this issue, would you mind if we merge this now?

@simonduq
Copy link
Member Author

@mcr, merging as tunslip6 currently broken for several users, please open a new PR if you come up with a better fix.

simonduq added a commit that referenced this pull request Oct 23, 2015
@simonduq simonduq merged commit 9171ba1 into contiki-os:master Oct 23, 2015
@mcr
Copy link
Contributor

mcr commented Oct 26, 2015

Simon Duquennoy notifications@github.com wrote:
> @mcr, any news? More and more people are reporting this issue, would you mind
> if we merge this now?

Go ahead. I have been ill for a week.
I'll work something out on top of the new code.

] Never tell me the odds! | ipv6 mesh networks [
] Michael Richardson, Sandelman Software Works | network architect [
] mcr@sandelman.ca http://www.sandelman.ca/ | ruby on rails [

@simonduq simonduq deleted the pr/fix-tunslip6 branch February 1, 2016 14:12
alexrayne pushed a commit to alexrayne/contiki that referenced this pull request Jun 21, 2020
rpl-lite: fix out-of-bounds write warning in rpl_set_prefix_from_addr()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants