Gordon Ross wrote: > James Carlson wrote: > >> Neither taking an interface (or route) down nor adding an ipfilter entry >> are really equivalent to FIN. FIN starts an orderly shutdown, which >> gives you a zero-length read. Timeouts (due to missing routes or >> dropped packets) end up causing a reset connection -- as though you >> received RST -- and can result in SIGPIPE, depending on how things play out. > > I don't really care what error the recv loop gets. The typical > real-life cases are: (1) server shutdown, we get a FIN, and > (2) server crash, and we get an RST when it comes back up. > > It would be good enough for this test if smbiod gets just about > any error from the recv call, i.e. ECONNRESET, EHOSTUNREACH
All the more reason to have multiple testing scenarios. >> If you just don't care, you could use the undocumented >> TCP_IOC_ABORT_CONN ioctl to abort the connection. > > Would I need to send this ioctl down the particular socket that > I want to force closed? Or how would I identify the victim? It's not documented, but a quick google search finds: http://typo.submonkey.net/pages/tcpdrop-solaris It's PSARC/2001/292, which is currently unpublished, but shouldn't be. >> Such a proxy might allow you to do other useful things, such as writing >> a journal for debug purposes or simulating hard-to-create test >> configurations. > > A good suggestion, but I'm hoping for an easier solution. Don't forget netcat, which is easier. But I don't think of the proxy as particularly hard. It probably doesn't need to be more than 1000 lines of code in C; perhaps less if you pick something higher level. > Someone suggested ipf(1M), which seems like an interesting idea. > Maybe that would let me cause a RST for connections to some IP? > (I'm not too familiar with the capabilities of ipf.) Yes. See ipf(4) -- which is inexplicably left out of OpenSolaris, but isn't too hard to find on the web. You want the "return-rst" option. >> Isn't smbiod already integrated? Shouldn't there already be a test >> suite with error simulations ... ? > > Yes, but this was allowed in with an open test CR: 6856802 > Need tests for CIFS client auto-reconnect Isn't there a test for abnormal client shutdown? There should be, and I'd think that test (whatever it is) would be a good starting place for a reconnect test. -- James Carlson 42.703N 71.076W <carls...@workingcode.com> _______________________________________________ networking-discuss mailing list networking-discuss@opensolaris.org