<p>Patch set 4:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941/4/ggsn/ggsn.c">File ggsn/ggsn.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941/4/ggsn/ggsn.c@458">Patch Set #4, Line 458:</a> <code style="font-family:monospace,monospace">             if (pdp->eua.l < 2 || pdp->eua.v[0] != 0xf1)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">taken from lib/in46_addr. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Don't play with eua fields directly, it's cumbersome and difficult to follow. Better move "(num_addr = in46a_from_eua(&pdp->eua, addr)" block from line 459 up here and then use that to decide the default apn.</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">then:<br>switch (num_addr) {<br>  case 2:<br>     ... v4v6 default ...<br>  case 1:<br>     if(in46a_is_v4(&addr[0])<br>        ... v4 default ...<br>     else<br>        ... v6 default ...<br>  default:<br>     .... (check if in46a_from_eua can return 0 or negative and probably pdp reject here ....<br>        <br>}</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941/4/ggsn/ggsn.c@486">Patch Set #4, Line 486:</a> <code style="font-family:monospace,monospace">     if (pdp->eua.l > 2)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Also this needs to be moved up.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941/4/ggsn/ggsn_vty.c">File ggsn/ggsn_vty.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941/4/ggsn/ggsn_vty.c@300">Patch Set #4, Line 300:</a> <code style="font-family:monospace,monospace"> "default-apnv6 NAME",</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I agree the name is a bit odd, the dash would improve things. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Simply deprecated + redirect old default-apn NAME to be default-apn v4 NAME, and have the "default-apn (v4|v6|v4v6) NAME" that laforge suggested.</p><p style="white-space: pre-wrap; word-wrap: break-word;">deprecate + redirect is already supported by some macro in libosmocore and we use that in some projects.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941">change 17941</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ggsn/+/17941"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ggsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I03fcf8a1532bd9988ea99a6afd3dc325174ce9d6 </div>
<div style="display:none"> Gerrit-Change-Number: 17941 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 25 Apr 2020 14:02:36 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Comment-In-Reply-To: keith <keith@rhizomatica.org> </div>
<div style="display:none"> Comment-In-Reply-To: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>