kern/86258: wrong expression in sys/netgraph/ng_pppoe.c

hiroshi oota ghelp at excite.co.jp
Sat Sep 17 08:20:12 PDT 2005


>Number:         86258
>Category:       kern
>Synopsis:       wrong expression in sys/netgraph/ng_pppoe.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 17 15:20:04 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     hiroshi oota
>Release:        7.0-CURRENT
>Organization:
>Environment:
FreeBSD  7.0-CURRENT FreeBSD 7.0-CURRENT #21: Thu Sep  8 08:17:21 UTC 2005 i386

>Description:
A strange conditional expression is in sys/netgraph/ng_pppoe.c. 
Probably, it is a mistake.

enum state {
    PPPOE_SNONE=0,      /* [both] Initial state */
....
                       if (sp->state |= PPPOE_SNONE) { 
>How-To-Repeat:

>Fix:
--- sys/netgraph/ng_pppoe.c.orig        Fri Jul  8 15:11:43 2005
+++ sys/netgraph/ng_pppoe.c     Sat Sep 17 13:43:32 2005
@@ -720,7 +720,7 @@
                        if (msg->header.cmd == NGM_PPPOE_SERVICE) {
                                break;
                        }
-                       if (sp->state |= PPPOE_SNONE) {
+                       if (sp->state != PPPOE_SNONE) {
                                printf("pppoe: Session already active\n");
                                LEAVE(EISCONN);
                        }

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list