ufw

ERROR: 'Bad interface name' issuing ufw on valid, but non "ethx", interface names

Bug #568877 reported by Francesco Pretto
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ufw
Fix Released
Undecided
Unassigned
Declined for Trunk by Jamie Strandboge
ufw (Ubuntu)
Fix Released
Undecided
Unassigned
Declined for Lucid by Jamie Strandboge

Bug Description

Very simple, ufw doesn't accept all valid interface names. The command:

$ sudo ufw allow in on iaslab to any port 67

where "iaslab" is a valid interface name (in complicated environments is useful to rename interfaces semantically), results in:

ERROR: 'Bad interface name'

Solution: ufw should accept any interface name accepted by iptables. If you want something user friendly, ufw should warn at most that the interface is not present (just a warning, not an error). This wasn't my case because the interface "iaslab" was really present, but could help with typing errors.

Version:
$ sudo ufw --version
ufw 0.30pre1-0ubuntu2

Related branches

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This is failing due to:
        if not re.match(r'^[a-zA-Z][a-zA-Z0-9:]*[0-9]', str(name)):
            err_msg = _("Bad interface name")
            raise UFWError(err_msg)

You can work around this by adjusting 'iaslab' to be 'iaslab0'.

Changed in ufw:
status: New → Triaged
Changed in ufw (Ubuntu):
status: New → Triaged
Changed in ufw:
status: Triaged → Fix Committed
Changed in ufw:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ufw - 0.30.0-1ubuntu1

---------------
ufw (0.30.0-1ubuntu1) maverick; urgency=low

  * src/frontend.py: display unicode error messages properly. Thanks to
    Serguey Basalaev.
    - upstream commit r700
    - LP: #580032
  * src/backend_iptables.py: fix gettext warning
    - upstream commit r701
  * run debconf-updatepo, but adjust debian/po/de.po and debian/po/es.po to
    add correct "Language:" tag
  * profiles/ufw-mailserver: remove Postfix specific language
    - upstream commit r705

ufw (0.30.0-1) unstable; urgency=low

  * New upstream release. Use 0.30.0 as the version even though upstream uses
    0.30 in order to sync to Ubuntu. Fixes:
    - LP: #568877
    - LP: #611982
    - LP: #606997
    - LP: #624199
    - LP: #625340
    - LP: #521359
    - LP: #436608
  * don't flush chains if ufw is not enabled (LP: #581744)
  * debian/postinst: don't source /usr/share/debconf/confmodule when $1 =
    triggered. Fix thanks to Colin Watson. (LP: #618410)
  * debian/control:
    - drop versioned depends on iptables. This helps with backporting now that
      the test suite can handle it
    - updated Standards-Version
  * debian/rules:
    - pass interpreter to run_tests.sh
    - don't install upstream application profiles for now
  * add rsyslog support
  * add debian/source/format
  * debian/before6.rules.md5sum: updated for ucf
 -- Jamie Strandboge <email address hidden> Mon, 30 Aug 2010 13:20:58 -0500

Changed in ufw (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Maciek Sujkowski (maciejus) wrote :

Can you add this fix to the ufw in lucid?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.