Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 1998 23:01:18 +0200
From:      Gary Jennejohn <garyj@peedub.muc.de>
To:        balu@dva.in-berlin.de (Boris Staeblow)
Cc:        freebsd-isdn@FreeBSD.ORG
Subject:   Re: ifconfig iprX down -> disconnect? 
Message-ID:  <199806192101.XAA00496@peedub.muc.de>
In-Reply-To: Your message of "Fri, 19 Jun 1998 21:22:40 %2B0200." <m0yn6kC-000q6kC@dva.in-berlin.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
Boris Staeblow writes:
>Gary Jennejohn writes:
>
>> Sorry, I didn't test it with 0.62. I thought it used to work with older
>> versions, but now that I look at the code I don't see how it ever could
>> have. I must have confused ipr with isppp. I _know_ that isppp works.
>> 
>> Try this (untested except for compiling) patch and report back to the list.
>> This is basically the same code used by isppp.
>
>It didn't work. Same behaviour as before. :-(
>
>Did another one tested this patch with success?
>

Hellmuth subsequently wrote that he's implemented a fix, but didn't post any
diffs.

Since I've now had more time to look at the code more carefully and actually
do some testing I can now post a patch I know works.

*** driver/i4b_ipr.c.orig	Fri Jun 19 10:01:42 1998
--- driver/i4b_ipr.c	Fri Jun 19 22:53:28 1998
***************
*** 464,469 ****
--- 464,470 ----
  	struct ifaddr *ifa = (struct ifaddr *)data;
  	int s;
  	int error = 0;
+ 	call_desc_t *cd = sc->sc_cdp;
  
  	s = SPLI4B();
  	
***************
*** 481,490 ****
  
  		case SIOCSIFFLAGS:	/* set interface flags */
  			if((!(ifr->ifr_flags & IFF_UP)) &&
! 				(sc->sc_if.if_flags & IFF_RUNNING))
  			{
  				/* DISCONNECT */
! 				/* sc->sc_if.if_flags &= ~IFF_RUNNING; */
  			}
  			microtime(&sc->sc_if.if_lastchange);
  			break;
--- 482,494 ----
  
  		case SIOCSIFFLAGS:	/* set interface flags */
  			if((!(ifr->ifr_flags & IFF_UP)) &&
! 				(sc->sc_state == ST_CONNECTED))
  			{
  				/* DISCONNECT */
! 				/* this is the way Helle does it in the timeout routine */
! 				(*ctrl_desc[cd->controller].N_DISCONNECT_REQUEST)(cd->cdid, CAUSE_NORMAL);
! 				/* should be generalized, not just disconn due to timeouts */
! 				i4b_l4_idle_timeout_ind(cd);
  			}
  			microtime(&sc->sc_if.if_lastchange);
  			break;

---
Gary Jennejohn
Home - garyj@muc.de
Work - garyj@fkr.dec.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806192101.XAA00496>