Skip to content

gnrc_ndp: add support for address-less link-layers#3628

Merged
OlegHahm merged 2 commits intoRIOT-OS:masterfrom
miri64:ng_ndp/enh/0-length-addr
Sep 2, 2015
Merged

gnrc_ndp: add support for address-less link-layers#3628
OlegHahm merged 2 commits intoRIOT-OS:masterfrom
miri64:ng_ndp/enh/0-length-addr

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Aug 14, 2015

Allows NDP to handle link-layers without addresses. This is achieved by handling the updating of the neighbor cache outside the context of the SL2A handle function and giving that function a numerical return value that states the length of the link-layer address (or negative for an error)

@miri64 miri64 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation NSTF labels Aug 14, 2015
@miri64 miri64 added this to the Release 2015.08 milestone Aug 14, 2015
@miri64 miri64 mentioned this pull request Aug 14, 2015
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 14, 2015

For some reason I saw very strange behavior regarding state changes on native. When entering ng_ndp_internal_set_state() the state was always DELAY, independent of what it was called with.

@miri64 miri64 force-pushed the ng_ndp/enh/0-length-addr branch 3 times, most recently from 6bd6608 to eb85239 Compare August 17, 2015 11:52
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 17, 2015

Rebased to current master

@miri64 miri64 force-pushed the ng_ndp/enh/0-length-addr branch from eb85239 to fb37831 Compare August 19, 2015 11:16
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 19, 2015

Rebased to current master

@miri64 miri64 changed the title ng_ndp: add support for address-less link-layers gnrc_ndp: add support for address-less link-layers Aug 19, 2015
@miri64 miri64 force-pushed the ng_ndp/enh/0-length-addr branch 3 times, most recently from 1141706 to 37dac1e Compare August 25, 2015 12:38
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 25, 2015

Rebased to current master.

@miri64 miri64 added the Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties label Aug 25, 2015
@miri64 miri64 force-pushed the ng_ndp/enh/0-length-addr branch from 37dac1e to f7dfc25 Compare August 25, 2015 12:39
@cgundogan
Copy link
Copy Markdown
Member

For some reason I saw very strange behavior regarding state changes on native. When entering ng_ndp_internal_set_state() the state was always DELAY, independent of what it was called with.

Is this fixed, or do you still see this strange behavior?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 25, 2015

Is this fixed, or do you still see this strange behavior?

Neighbor is reachable and later stale, so it seems to be:

> ifconfig
ifconfig
Iface  7   HWaddr: ea:29:ba:c8:38:be 
           MTU:1500  
           inet6 addr: ff02::1/128  scope: local [multicast]
           inet6 addr: fe80::e829:baff:fec8:38be/64  scope: local
           inet6 addr: ff02::1:ffc8:38be/128  scope: local [multicast]

> ncache
ncache
IPv6 address                    if  L2 address                state       type
------------------------------------------------------------------------------
fe80::58ff:38ff:fead:9beb        7  5a:ff:38:ad:9b:eb         REACHABLE   -
> ncache
ncache
IPv6 address                    if  L2 address                state       type
------------------------------------------------------------------------------
fe80::58ff:38ff:fead:9beb        7  5a:ff:38:ad:9b:eb         STALE       -

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 31, 2015

Got some fixes over from #3049 that were supposed to be in here.

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Sep 1, 2015

Hm, no, only Linux isn't responding to RIOT's neighbor solicitation. Maybe this is because of the tun interface?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 1, 2015

Mh… can you maybe inject them with scapy for now? I'll try to figure out, what is wrong.

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Sep 1, 2015

How could I add the ncache entry manually in RIOT?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 1, 2015

ncache add <if> <ip-addr> <ll-addr>

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 1, 2015

oh… the command can't handle address-less link-layers currently ^^ lemme fix that

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Sep 1, 2015

Gotta go now. However, in the worst case I'm willing to ACK this even if Linux-interaction over slip is not working for now.

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Sep 1, 2015

Just thinking about it: isn't it quite pointless to send out neighbor solicitations on an addressless link-layer anyway?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 1, 2015

Why, for NUD it is still required.

@cgundogan
Copy link
Copy Markdown
Member

Well, neighbor solicitations are also used to verify if a neighbor is reachable or not.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 1, 2015

Adapted ncache shell command

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Sep 1, 2015

How do you know if a neighbor is reachable if you cannot address it?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 1, 2015

You send a neighbor solicitation (either to the IPv6 address of the node if you already know the host [from previous communiction] or to the solicited-nodes multicast address of the IPv6 address if you don't know it) with the IPv6 address of the node in it's target field. If you get a neighbor advertisement with the solicited flag set and the target address being set to the IPv6 address you tested the reachability for, you know the neighbor is reachable.

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Sep 1, 2015

Hm, okay, but still the Linux side doesn't seem convinced that answering a neighbor solicitation for a tun interface. What about using a tap interface on the Linux side? Wouldn't this make things easier and remove the need for any exception case on the RIOT side?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 2, 2015

a) a TAP interface is an Ethernet interface and SLIP is an other link-layer. So I don't see how you would use a TAP, at least not with some effort in tunslip. Are you sure it is because the TUN interface? (Linux' own [IPv6 incapable] SLIP tool slattach also creates a TUN btw).
b) this is definitely out of scope for this PR (let's discuss this in an issue or something like that).

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Sep 2, 2015

Ok, we don't have the time right now to debug this problem. The rest seems working (though I'm not happy with the rather big changes to "normal" ND), so let's move on. Please squash.

@miri64 miri64 force-pushed the ng_ndp/enh/0-length-addr branch from 121a379 to 8e0e26c Compare September 2, 2015 10:01
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 2, 2015

Squashed

@OlegHahm OlegHahm added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable labels Sep 2, 2015
@miri64 miri64 force-pushed the ng_ndp/enh/0-length-addr branch from 8e0e26c to 6e0a447 Compare September 2, 2015 10:51
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 2, 2015

Fixed error in shell and squashed immediately

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Sep 2, 2015

If I add the Linux host manually to the neighbor cache by calling something like ncache add 5 fe80::1 the ping to fe80::1 is sent with the unspecified address as source address...

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 2, 2015

Have you set a source address on the interface?

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Sep 2, 2015

lol - I did, but apparently rebooted afterwards. Now it's working.

OlegHahm added a commit that referenced this pull request Sep 2, 2015
gnrc_ndp: add support for address-less link-layers
@OlegHahm OlegHahm merged commit 6786da0 into RIOT-OS:master Sep 2, 2015
@miri64 miri64 deleted the ng_ndp/enh/0-length-addr branch September 2, 2015 12:16
@miri64 miri64 added the Area: network Area: Networking label Sep 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants