<h1>Backport of <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="403483460" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/10879" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/10879/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/10879">#10879</a></h1>

<h3>Contribution description</h3>
<p>Currently an interface's existence is not checked when it is supplied<br>
by the user with the <code>nib</code> command. This can lead to assertion errors<br>
as soon as the generated entry tries to resolve an address or route<br>
generated with that command and the network interface not being found.</p>

<h3>Testing procedure</h3>
<p>Run <code>gnrc_networking</code> on any board and try to add a neighbor/prefix/route to an interface that does not exist. Without this PR you will succeed, worse even, if you send to that neighbor/prefix/route the node will run into a failed assertion within the <code>nib</code>. With this PR an error message will be printed, that the interface does not exist.</p>

<h3>Issues/PRs references</h3>
<p>None</p>


<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/10886'>https://github.com/RIOT-OS/RIOT/pull/10886</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>sc_gnrc_ipv6_nib: check interface existence</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/10886/files#diff-0">sys/shell/commands/sc_gnrc_ipv6_nib.c</a>
    (37)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/10886.patch'>https://github.com/RIOT-OS/RIOT/pull/10886.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/10886.diff'>https://github.com/RIOT-OS/RIOT/pull/10886.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/10886">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AEn7YHyA5PR66jyfUxGFTpCF34G-8R0fks5vHrk7gaJpZM4aVcIa">mute the thread</a>.<img src="https://github.com/notifications/beacon/AEn7YJtBgetUJjXaJpIPEKINj0T9J8LVks5vHrk7gaJpZM4aVcIa.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/RIOT-OS/RIOT","title":"RIOT-OS/RIOT","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/RIOT-OS/RIOT"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"sc_gnrc_ipv6_nib: check interface existence [backport 2019.01] (#10886)"}],"action":{"name":"View Pull Request","url":"https://github.com/RIOT-OS/RIOT/pull/10886"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/10886",
"url": "https://github.com/RIOT-OS/RIOT/pull/10886",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>