Klemens Nanni <[email protected]> wrote:

> Yes, although I agree with jmc on simpler wording. FWIW, FreeBSD just
> goes with "-D Set the Don't Fragment bit" as well.

Suppose so.

> On Sat, Nov 10, 2018 at 03:27:19PM +1000, David Gwynne wrote:
> > @@ -681,6 +681,13 @@ main(int argc, char *argv[])
> >                             warn("setsockopt(IPV6_TVAL)"); /* XXX err? */
> >             }
> >  
> > +           if (df) {
> > +                   optval = 1;
> > +                   if (setsockopt(s, IPPROTO_IPV6, IPV6_DONTFRAG,
> > +                       &optval, (socklen_t)sizeof(optval)) < 0)
> > +                           warn("setsockopt(IPV6_DONTFRAG"); /* err? */
> I'm inclined to error out on all setsockopt(2) calls.  Crafting special
> packets is always deliberate, thus the code should fail if not all
> requested options could be set.  Users may simply retry (with other
> options) to get it working instead of keep sending different packets.

I agree on that point.

Reply via email to