lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 08 Jan 2009 02:26:31 +0100
From:	Krzysztof Halasa <khc@...waw.pl>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] hdlc: fix compile problem

Stephen Hemminger <shemminger@...tta.com> writes:

> Alternatively, how about this:
>
> --- a/drivers/net/wan/hdlc.c	2009-01-07 17:04:52.002497019 -0800
> +++ b/drivers/net/wan/hdlc.c	2009-01-07 17:07:02.874497531 -0800
> @@ -40,8 +40,6 @@
>  
>  static const char* version = "HDLC support module revision 1.22";
>  
> -static const struct header_ops hdlc_null_ops;
> -
>  #undef DEBUG_LINK
>  
>  static struct hdlc_proto *first_proto;
> @@ -100,7 +98,7 @@ static int hdlc_device_event(struct noti
>  	if (dev_net(dev) != &init_net)
>  		return NOTIFY_DONE;
>  
> -	if (dev->header_ops != &hdlc_null_ops)
> +	if (dev->priv_flags & IFF_WAN_HDLC)
>  		return NOTIFY_DONE; /* not an HDLC device */
>  
>  	if (event != NETDEV_CHANGE)

"dev->netdev_ops->start_hard_xmit != hdlc_xmit" is a dirty hack.
IFF_WAN_HDLC is much cleaner though it's an additional bit consumed.
Sure, I like it.
-- 
Krzysztof Halasa
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists