Last Comment Bug 93186 - [HAVE FIX] mozbot may not connect on dual-homed boxes
: [HAVE FIX] mozbot may not connect on dual-homed boxes
Product: Webtools
Classification: Server Software
Component: Mozbot (show other bugs)
: other
: x86 Linux
: -- normal (vote)
: 2.2
Assigned To: Hixie (not reading bugmail)
Depends on:
  Show dependency treegraph
Reported: 2001-08-01 19:35 PDT by Christian Reis
Modified: 2009-07-03 22:23 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

patch to add localaddr to (1.27 KB, patch)
2001-08-01 19:38 PDT, Christian Reis
no flags Details | Diff | Splinter Review
patch to make use the localaddr for connecting (1.08 KB, patch)
2001-08-01 19:38 PDT, Christian Reis
no flags Details | Diff | Splinter Review
Patch version 2 (3.41 KB, patch)
2002-02-12 09:34 PST, Hixie (not reading bugmail)
kiko: review+
Details | Diff | Splinter Review

Description Christian Reis 2001-08-01 19:35:45 PDT
When doing the initial run of mozbot, boxes with two network cards may be unable
to connect to an IRC server. This is caused by Net::IRC trying to connect with
the address of the internal interface when the correct address would be the
external one. mozbot hangs for a while and then complains:2001-08-02 02:23:54
UTC (27334) Subject: Help! I can't talk to!
2001-08-02 02:23:54 UTC (27334) 

Hello Sir or Madam!

I'm afraid I could not connect to the IRC server. I tried, and will
try and try again (unless you kill me...) but it was fruitless.

Could you kick the IRC server for me? Give it a right ol' booting.
And hit the network connection while you are at it, would you please?

Comment 1 Christian Reis 2001-08-01 19:37:36 PDT
Jake has provided me with a workable patch from justdave, which I have in turn
changed a bit. 

There are two patches, actually: one to Net::IRC's, and the other
to itself. I guess the patch to could be distributed
with mozbot since it's a common problem AFAICS. mozbot's patch might be
considered intrusive, but what's the big deal with specifying an IP address :)
Comment 2 Christian Reis 2001-08-01 19:38:14 PDT
Created attachment 44333 [details] [diff] [review]
patch to add localaddr to
Comment 3 Christian Reis 2001-08-01 19:38:54 PDT
Created attachment 44334 [details] [diff] [review]
patch to make use the localaddr for connecting
Comment 4 timeless 2001-08-01 20:56:21 PDT
fwiw Net::IRC was deprecated in favor of a much more complicated module which i 
vowed never to use in mozbot. and then mozbot was rewritten for 2.0.

other than that the patches look ok (Net::IRC is modifable under Perl's 
Artistic License - no known license problems :-).

the only other question is what the checkin rules are for mozbot.  I think 
we're going w/ module owner + strong perl hacker. but i'm not sure.
Comment 5 Hixie (not reading bugmail) 2001-08-02 04:16:57 PDT
Since the patches are interconnected, I don't know what to do. I don't think we
can require everyone who uses mozbot to patch their Net::IRC, for one some of
them (including me in one case) haven't got write access to the relevant files.

Is Net::IRC still being maintained at all?
Comment 6 timeless 2001-08-02 08:05:56 PDT
you can install a local copy of Net::IRC it should override the non local copy, 
that's what i do on windows. as for maintenance i don't understand that stuff 
ask zach the resident cpan expert.
Comment 7 Zach Lipton [:zach] 2001-08-02 11:16:01 PDT
you SHOULD be able to install a local copy and add it to @INC, but many 
CPAN modules don't understand how to do this. The README 
has more info on this topic.

Resident CPAN Guru
Comment 8 Hixie (not reading bugmail) 2002-02-05 17:37:43 PST
Removing 'review' keyword since the comments from the last review haven't yet
been addressed.
Comment 9 Christian Reis 2002-02-05 17:45:01 PST
We should bother Net::FTP maintainers, if they exist, to apply the patch, and
fix mozbot to ask for an IP address, I guess. 

I really have no idea for another solution.
Comment 10 Dave Miller [:justdave] ( 2002-02-11 11:31:03 PST
I was just pointed at this bug by an email from Hixie...

This is already fixed in Net::IRC as of version 0.71.

If you require Net::IRC 0.71 as a minimum version you only need the mozbot half
of this patch.
Comment 11 Hixie (not reading bugmail) 2002-02-12 05:02:44 PST
Oh, cool, I had no idea anything had changed. Ok, I'll investigate the mozbot
part of the patch further.
Comment 12 Hixie (not reading bugmail) 2002-02-12 09:34:19 PST
Created attachment 69057 [details] [diff] [review]
Patch version 2

An alternative approach (doesn't have a UI for changing the localAddr setting).

What do people think?
Comment 13 Christian Reis 2002-02-12 10:46:37 PST
Comment on attachment 69057 [details] [diff] [review]
Patch version 2

looks fine to me
Comment 14 Hixie (not reading bugmail) 2002-02-12 16:12:59 PST
cool, thanks
Comment 15 Hixie (not reading bugmail) 2002-02-12 16:55:27 PST
checked in

Note You need to log in before you can comment on or make changes to this bug.