From nobody@FreeBSD.org  Sat Sep 17 15:17:49 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E704916A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 17 Sep 2005 15:17:49 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B7AA743D46
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 17 Sep 2005 15:17:49 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j8HFHnET038871
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 17 Sep 2005 15:17:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j8HFHnt4038870;
	Sat, 17 Sep 2005 15:17:49 GMT
	(envelope-from nobody)
Message-Id: <200509171517.j8HFHnt4038870@www.freebsd.org>
Date: Sat, 17 Sep 2005 15:17:49 GMT
From: hiroshi oota <ghelp@excite.co.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: wrong expression in sys/netgraph/ng_pppoe.c
X-Send-Pr-Version: www-2.3

>Number:         86258
>Category:       kern
>Synopsis:       wrong expression in sys/netgraph/ng_pppoe.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 17 15:20:04 GMT 2005
>Closed-Date:    Tue Sep 20 13:48:43 GMT 2005
>Last-Modified:  Tue Sep 20 13:48:43 GMT 2005
>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:
State-Changed-From-To: open->patched 
State-Changed-By: glebius 
State-Changed-When: Mon Sep 19 11:04:59 GMT 2005 
State-Changed-Why:  
Committed, thanks! 


Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Mon Sep 19 11:04:59 GMT 2005 
Responsible-Changed-Why:  
Take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86258 
State-Changed-From-To: patched->closed 
State-Changed-By: glebius 
State-Changed-When: Tue Sep 20 13:48:24 GMT 2005 
State-Changed-Why:  
Merged to STABLE branches. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86258 
>Unformatted:
