On 24/08/16(Wed) 21:49, Alexander Bluhm wrote:
> On Wed, Aug 24, 2016 at 05:52:39PM +0200, Martin Pieuchot wrote:
> > Diff below simplifies ip6_getpmtu() to use a 'struct rtentry *' instead
> > of two 'struct route_in6'.
> >
> > ok?
>
> I have tested it with regress/sys/netinet/pmtu .
>
> OK bluhm@
thanks!
> > + if (rt != NULL) {
> ...
> > - } else if (ifp0) {
> > - mtu = ifp0->if_mtu;
> > + } else if (ifp) {
> > + mtu = ifp->if_mtu;
> > } else
> > error = EHOSTUNREACH; /* XXX */
>
> Isn't your style to write ifp != NULL? And I doubt that ifp can
> ever be NULL here. But better safe than sorry.
Hey you're right, you know me better than myself! I double checked and
removed the ifp != NULL check, it cannot be NULL when the function is
called.