[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190416.210040.259210223209519229.davem@davemloft.net>
Date: Tue, 16 Apr 2019 21:00:40 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: tom@...bertland.com
Cc: netdev@...r.kernel.org, tom@...ntonium.net
Subject: Re: [PATCH v3 net-next 3/7] ipv6: Consolidate option cases in
ip6_datagram_send_ctl
From: Tom Herbert <tom@...bertland.com>
Date: Mon, 15 Apr 2019 10:52:16 -0700
> case IPV6_2292HOPOPTS:
> case IPV6_HOPOPTS:
> - if (opt->hopopt || cmsg->cmsg_len < CMSG_LEN(sizeof(struct ipv6_opt_hdr))) {
> - err = -EINVAL;
> - goto exit_f;
> - }
You're consolidated version of this code checks opt->hopopt after
things like ns_capable() thus changing the priorities of the error
conditions. You code get -EPERM when previously -EINVAL would have
been seen.
I really don't like changes like this, it's so irritating double checking
all of the possible user visible side effects in all of these details.
Powered by blists - more mailing lists