[systemd-devel] [PATCH 1/1] networkd: sit-tunnel add support for pmtudisc

Susant Sahani susant at redhat.com
Wed May 21 20:02:07 PDT 2014


> +        netdev->tunnel_pmtudisc = 1;

Should be "true", not "1". If something is of type "bool" we should use
"true" for setting it and "false" for unsetting it. And this is of type "bool".

Ok .

>  static int netdev_fill_sit_rtnl_message(Link *link, sd_rtnl_message *m) {
>          NetDev *netdev;
> +        uint8_t pmtudisc = 1;
>          int r;
>  
>          assert(link);
> @@ -207,6 +208,17 @@ static int netdev_fill_sit_rtnl_message(Link *link, sd_rtnl_message *m) {
>                  return r;
>          }
>  
> +        if(!netdev->tunnel_pmtudisc)
> +                pmtudisc = 0;

This should also be enough:

pmtudisc = netdev->tunnel_pmtudisc;

No need to invole an if check here... bools automatically convert to 0
and 1 if you assign them to an integer.

Cool. thanks 

Lennart




Susant


More information about the systemd-devel mailing list