BlueLines has asked for the wisdom of the Perl Monks concerning the following question:
This is going to be long, so i apologize in advance for anyone who's bored by this. If you just want the question, skip to the end.
I work at a company that does 80% of it's coding in perl. I feel blessed because i know a lot of people who would kill for a programming job not involving VB or java. So the point of this is the fact that we're encouraged to do everything in perl if it's feasable. We are also encouraged to use CPAN whenever possible, since time is money, and with the way the economy is right now, no startup can afford to pay people to reinvent the wheel. My copmany makes transparent / explicit proxying software. The technology is super cool. When we do transparent proxying , we usually use a layer 4 switch to route all traffic destined to port 80 to our proxy, which handles everything from there. Our proxy usually listens on a different port than 80 though, so somehow the traffic must be forwared from one port to another. Originally (before I got there), this was done with squid. But squid is slow and big and ugly. So i proposed the use of ipchains instead (all of our machines run linux). I set up a proof of concept box to show that ipchains could handle 10x more connections than squid while using 1/10th of the system resources that squid would have. This is a good thing. Then it fell upon me to automate this process. Originally i wrote a module to grab configuration info from a config file, and construct the appropriate command line stuff for ipchains. Most importantly, I had this rule:
which redirects all traffic destined to port 80 to port 3000 instead. This made transparent proxying work. Unfortunately , the code to do this was pretty dirty. I searched CPAN and found IPChains.pm, which gave OO methods to accomplish the same thing, and used SWIG to directly make the C calls, rather than running a shell. This was definitely cooler, so I started rewriting my module to use this interface instead./sbin/ipchains -A input -s 0.0.0.0/0 -d 0.0.0.0/0 80:80 -p6 -j REDIREC +T 3000
Then i found a problem. The IPChains.pm module didn't allow you to specify a port to redirect to if 'REDIRECT' was your action. This made redirection pointless, and prevented me from accomplishing what the above ipchains command did. So (like any good hacker), I went through the code, wrote an option in for what I wanted, and made it work (which could have never happened if i didn't have access to source code). Which brings me to my question.
I generated a patch for the module, and sent it off to the author. It's been a week, and I haven't heard anything back. The last time this code was updated was September 1999, which makes me think the author has no intentions of releasing a new version anytime soon. The code is GPL'd, so I could just release my own version with the patch, but somehow I feel like i'm going behind the author's back by doing so. So I guess what I'm asking is what do you do when you have bug fixes for code that's not being maintained anymore?
Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.