On Thu, Apr 20, 2017 at 04:37:18PM -0700, Cong Wang wrote: > On Thu, Apr 20, 2017 at 3:43 PM, David Ahern <d...@cumulusnetworks.com> wrote: > > > > I scanned the others. It is not clear that others should fail with > > EINVAL. Certainly a mask of unused flags can be added, but to me that is > > on top of this bug fix. > > > > If we want to preserve those unused bits, we should reject them too. > > RTF_PCPU is special here, it is used but only internally, so it makes > sense to silently clear it since we don't care whether people set it to > 1 or 0. We should clear it for dumping too since it is internal only. I agree with DavidA. The existing bits (including RTF_PCPU) during dumping is part of the uapi already. We cannot stop displaying them now.
Silently accepting something instead of telling the userspace program has a bug seems to be a dis-service to the end-user. If there are other bits should be rejected too, they can be done in the follow up patches.