Search Linux Wireless

Re: [RFC PATCH 3/4] net: drop_monitor: use drop_reason_lookup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2023-09-21 at 10:51 +0200, Johannes Berg wrote:
> 
> -	if (!list ||
> -	    subsys_reason >= list->n_reasons ||
> -	    !list->reasons[subsys_reason] ||
> -	    strlen(list->reasons[subsys_reason]) > NET_DM_MAX_REASON_LEN) {
> -		list = rcu_dereference(drop_reasons_by_subsys[SKB_DROP_REASON_SUBSYS_CORE]);
> -		subsys_reason = SKB_DROP_REASON_NOT_SPECIFIED;
> -	}

Oops, I lost this translation of erroneous ones to the core
SKB_DROP_REASON_NOT_SPECIFIED.

Maybe we should just not have the attribute in that case? But that could
be a different change too.

> -	if (nla_put_string(msg, NET_DM_ATTR_REASON,
> -			   list->reasons[subsys_reason])) {
> +	reason_str = drop_reason_lookup(cb->reason);
> +	if (nla_put_string(msg, NET_DM_ATTR_REASON, reason_str)) {
>  		rcu_read_unlock();

johannes




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux