/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos

  • Committer: Teddy Hogeborn
  • Date: 2016-06-23 19:07:23 UTC
  • Revision ID: teddy@recompile.se-20160623190723-59lqa4gb3eykltzt
Server: Fix bug with --interface flag when "cc" is not installed.

* mandos (IPv6_TCPServer.server_bind): Since we fall back to setting
  SO_BINDTODEVICE to a hard-coded value if we failed to find out what
  it is, declare it as global so Python does not think that we are
  creating a new local variable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2453
2453
        """This overrides the normal server_bind() function
2454
2454
        to bind to an interface if one was specified, and also NOT to
2455
2455
        bind to an address or port if they were not specified."""
 
2456
        global SO_BINDTODEVICE
2456
2457
        if self.interface is not None:
2457
2458
            if SO_BINDTODEVICE is None:
2458
2459
                # Fall back to a hard-coded value which seems to be