Re: kmod and request-route

Chris Wedgwood (chris@cybernet.co.nz)
Fri, 12 Jun 1998 15:55:50 +1200


On Thu, Jun 11, 1998 at 11:29:17PM -0400, Michael Meissner wrote:

> Also in recent kernels, diald causes the message:
>
> kernel: diald uses obsolete (PF_INET,SOCK_PACKET)

Presumably at some point socket(PF_INET,SOCK_PACKET,0) will stop working.

I guess the right fix is something like:

#ifdef PF_PACKET
if((sock = socket(PF_PACKET,SOCK_PACKET,protocol)) == EPROTONOSUPPORT){
/* legacy kernel support */
#endif

sock = socket((PF_INET,SOCK_PACKET,protocol);

#ifdef PF_PACKET
}
#endif

if(sock < 0){ /* do error stuff ...*/

-Chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu