On 05/22/2014 08:32 AM, Susant Sahani wrote:
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
I guess we can directly assign the bool to the a integer and eliminate the uint8_t pmtudisc and pmtudisc = netdev->tunnel_pmtudisc; altogether. like sd_rtnl_message_append_u8(m, IFLA_IPTUN_PMTUDISC, netdev->tunnel_pmtudisc); Susant _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
