Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using "disconnect X" / "reset X" / "close X" from the console doesn't close the session #8

Open
erikarn opened this issue Sep 29, 2019 · 1 comment

Comments

@erikarn
Copy link
Collaborator

erikarn commented Sep 29, 2019

When a session disconnects via the remote end sending a disconnect/eof, the telnet process used as part of ax25 connect will correctly close a session.

However if it's aborted locally the session socket gets closed down, but the session itself doesn't go away.

Here's what I see in the console.

net> ps                                                                                                                                                                                                   
Uptime 0:00:00:22                                                                                                                                                                                         
ksigs 730 queued 511 hiwat 1 woken 637 nops 93 dups 0                                                                                                                                                     
kwaits 1328 nops 597 from int 0                                                                                                                                                                           
PID                stksize   event              fl  in  out  name                                                                                                                                         
0x800eab640        32768     0x293d30           IW           keyboard                                                                                                                                     
0x800eab3c0        32768     0x29333c           IW           timer                                                                                                                                        
0x800eabc80        32768     0x8010c5120        IW           connect                                                                                                                                      
0x80189a140        32768     0x8010c5040        IW           tel_out                                                                                                                                      
0x800eab500        32768     0x291028           IW           network                                                                                                                                      
0x800eab780        32768     0x28ec98           IW           encap tx                                                                                                                                     
0x800eaba00        32768     0x292028           IW           tnc0 asytx                                                                                                                                   
0x800eab280        32768     0x293cd0           IW           killer                                                                                                                                       
0x800eab8c0        32768     0x291f88           IW           tnc0 rx                                                                                                                                      
0x800eab140        32768     0x800782380        IW           display                                                                                                                                      
0x800eabb40        32768     0x8007ff250        IW           tnc0 tx                                                                                                                                      
0x800eab000        0         0x0                I            cmdintrp                                                                                                                                     
net> session                                                                                                                                                                                              
 #  S#  Snd-Q State     Remote socket         Command                                                                                                                                                     
 1  8192    0 Connected N0ARY-1 on tnc0       connect tnc0 N0ARY-1                                                                                                                                        
net> session 1                                                                                                                                                                                            
net> session                                                                                                                                                                                              
 #  S#  Snd-Q State     Remote socket         Command                                                                                                                                                     
net> close                                                                                                                                                                                                
net> connect tnc0 N0ARY-1                                                                                                                                                                                 
net> close 1                                                                                                                                                                                              
net> session                                                                                                                                                                                              
 #  S#  Snd-Q State     Remote socket         Command                                                                                                                                                     
 1  8192    0 Disc pend N0ARY-1 on tnc0       connect tnc0 N0ARY-1                                                                                                                                        
net> session                                                                                                                                                                                              
 #  S#  Snd-Q State     Remote socket         Command                                                                                                                                                     
 1  8192    0 Disc pend N0ARY-1 on tnc0       connect tnc0 N0ARY-1                                                                                                                                        
net> session                                                                                                                                                                                              
 #  S#  Snd-Q State     Remote socket         Command                                                                                                                                                     
 1  8192    0 Disc pend N0ARY-1 on tnc0       connect tnc0 N0ARY-1                                                                                                                                        
net> session                                                                                                                                                                                              
 #  S#  Snd-Q State     Remote socket         Command                                                                                                                                                     
 1  -1      0                                 connect tnc0 N0ARY-1                                                                                                                                        
net> session                                                                                                                                                                                              
 #  S#  Snd-Q State     Remote socket         Command                                                                                                                                                     
 1  -1      0                                 connect tnc0 N0ARY-1                                                                                                                                        
net> session                                                                                                                                                                                              
 #  S#  Snd-Q State     Remote socket         Command                                                                                                                                                     
 1  -1      0                                 connect tnc0 N0ARY-1                                                                                                                                        
net> session                                                                                                                                                                                              
 #  S#  Snd-Q State     Remote socket         Command                                                                                                                                                     
 1  -1      0                                 connect tnc0 N0ARY-1                                                                                                                                        
net> session                                                                                                                                                                                              
 #  S#  Snd-Q State     Remote socket         Command                                                                                                                                                     
 1  -1      0                                 connect tnc0 N0ARY-1                                                                                                                                        
net>                                                               
net> ps                                                                                                                                                                                                   
Uptime 0:00:02:39                                                                                                                                                                                         
ksigs 3983 queued 3261 hiwat 1 woken 3699 nops 284 dups 0                                                                                                                                                 
kwaits 7941 nops 3867 from int 0                                                                                                                                                                          
PID                stksize   event              fl  in  out  name                                                                                                                                         
0x800eab640        32768     0x293d30           IW           keyboard                                                                                                                                     
0x800eab3c0        32768     0x29333c           IW           timer                                                                                                                                        
0x800eab500        32768     0x291028           IW           network                                                                                                                                      
0x800eabdc0        32768     0x8010c5040        IW           connect                                                                                                                                      
0x800eab780        32768     0x28ec98           IW           encap tx                                                                                                                                     
0x800eaba00        32768     0x292028           IW           tnc0 asytx                                                                                                                                   
0x800eab280        32768     0x293cd0           IW           killer                                                                                                                                       
0x800eab8c0        32768     0x291f88           IW           tnc0 rx                                                                                                                                      
0x800eab140        32768     0x800782380        IW           display                                                                                                                                      
0x800eabb40        32768     0x8007ff250        IW           tnc0 tx                                                                                                                                      
0x800eab000        0         0x0                I            cmdintrp                                                                                                                                     
net>                                                                   
@erikarn
Copy link
Collaborator Author

erikarn commented Sep 29, 2019

tnrecv() needs to be broken out of for the freesession() path to be called. That only happens if kgetc(network) returns kEOF.

So I wonder what happens here during a local disconnect... whether this read will ever return kEOF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant