1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

23 Commits

Author SHA1 Message Date
Roopa Prabhu
f6d2d5eab5 fix errors in examples that were generate warnings
Ticket:
Reviewed By: trivial
Testing Done: Tested all example files with latest from 2.5.4
2015-09-09 11:21:24 -07:00
Sam Tannous
1e6d7bd76c add param in ifupdown2.conf to prevent fupdown2 users from specify interface config file on the CLI
Ticket: CM-7066
Reviewed By: scotte,roopa,olson
Testing Done: Unit testing and regression testing

This patch does two things:

1. It moves the interfaces config file name to the ifupdown2.conf file in /etc/network/ifupdown2.
This should allow administrators to specify a config file location different from the default and allow
subsets of users to use it without giving them access to specifying their own with the -i option in ifup/ifdown.

2. It also adds a new config setting called "disable_cli_interfacesfile" used to prevent users
from specifying their own interfaces file. This defaults to "1" (even if it is not configured).

Note: this new default takes away users ability to specify an interfaces file.

This should close the vulnerability where users could specify their own interfaces file
and add arbitrary user commands.

This leaves the shell=True option in the user commands add-on module since the ifup/ifdown/ifreload/ifquery
commands already require root access to run and the interfaces config file also requires root access to modify.
2015-08-20 22:59:44 -04:00
Sam Tannous
6cb589dfdf Allow customer set bond defaults for CL with ifupdown2
Ticket: CM-6723
Reviewed By: roopa
Testing Done: unit tested and testifupdown2 test suite

This patch installs bond interface defaults in

     /etc/network/ifupdown2/policy.d/bond_defaults.json

and allows users to modify this file.   Users can then leave out these
bond attributes in their configs to save typing and space.

It also changes the ifenslave and ifenslaveutil module to bond and
bondutil, respectively to be consistent with other modules
(and also because customers think of "bond" interfaces not
"ifenslave" interfaces.)

For example, the default file installed looks like the following:

{
    "README": "This file is user generated and modifiable.",
    "bond": {
        "defaults": {
                "bond-mode": "802.3ad",
                "bond-miimon": "100",
                "bond-use-carrier": "1",
                "bond-lacp-rate": "0",
                "bond-min-links": "1",
                "bond-xmic-hash-policy": "layer3+4"
         }
    }
}
Please enter the commit message for your changes. Lines starting
2015-07-22 18:38:07 -04:00
Roopa Prabhu
547084c312 un-glob expression in sample file
Ticket:
Reviewed By: trivial
Testing Done: Tested that sample works fine
2015-07-01 15:00:07 -07:00
Sam Tannous
139662ee08 Enhance globbing in ifupdown2 to support breakout cables
Ticket: CM-5365
Reviewed By: roopa,dwalton
Testing Done: Ran regression suite and hand tested.

This patch extends the globbing support in ifupdown2
to handle two levels of square brackets so that breakout
cables can be handled (e.g. swp[2-7]s[0-3]).  Also modified
the user's guide and the man pages.
2015-06-16 20:58:15 -04:00
Roopa Prabhu
0edaee373f merge docs.addons content into docs directory
Ticket:
Reviewed By:
Testing Done:
2015-03-10 14:18:30 -07:00
Roopa Prabhu
64db332a85 s/portautoedge/portadminedge/ + configure BA on uplink port
Ticket:
Reviewed By:
Testing Done:
2015-01-28 17:06:51 -08:00
anuradhak
c4842479ad Added clag-id to the interfaces example file.
Ticket:
Reviewed By:
Testing Done:
2015-01-12 13:52:33 -08:00
Roopa Prabhu
7ce1bb50e9 Fix a few more s/br/bridge/g
Ticket: CM-3346
Reviewed By:
Testing Done:
(cherry picked from commit e63e03e90af531ab660dca03f437f8432337c5d3)
2014-11-26 13:08:08 -08:00
Roopa Prabhu
5e4f0612fa Delete stale example files
Ticket: CM-3346
Reviewed By:
Testing Done: sanity tests
(cherry picked from commit ea6f72f628abc3758f4bf665a1c90e6d50860aea)
2014-11-26 13:07:55 -08:00
Roopa Prabhu
8c8dab1a3f Change names and s/br/bridge/
Ticket: CM-3346
Reviewed By:
Testing Done: Tested ifupdown2 sanity with all example files
(cherry picked from commit 40a3f646548c35bda34f4d41adb2e935374bb029)
2014-11-26 13:07:12 -08:00
Roopa Prabhu
84bf47c60a Fix clag example
Ticket: CM-3346
Reviewed By: scotte
Testing Done:
2014-11-17 04:45:45 -08:00
Roopa Prabhu
a5bbc8ed41 Fix comment
Ticket: Cm-3346
Reviewed By:
Testing Done:
2014-11-15 23:32:56 -08:00
Roopa Prabhu
7e39bbdfcf Add vlan aware bridge examples
Ticket: CM-3346
Reviewed By: pending review
Testing Done: example files are tested
2014-11-15 23:22:01 -08:00
Roopa Prabhu
904908bc5f Documentation cleanup
Ticket:
Reviewed By:
Testing Done:

- these changes are mainly related to api doc generation using sphinx
2014-07-22 11:15:56 -07:00
Roopa Prabhu
2c0ad8b338 Doc updates + cleanup
Ticket: CM-2297
Reviewed By:
Testing Done: compile tested

more updates coming ...
2014-07-17 11:44:36 -07:00
Roopa Prabhu
c25e5b6521 Add a new ifupdown2 example to cover bridge igmp and mstp attributes
Ticket: CM-1438
Reviewed By: TBD
Testing Done: Tested the example file with ifupdown2
2014-07-16 14:07:41 -07:00
Roopa Prabhu
f102ef630d Fix splits everywhere to include space and tabs. Use regex split
Ticket: CM-3121
Reviewed By:
Testing Done: Ran precommit

Conflicts:
	packages/ifupdown2-addons/pkg/modulebase.py
2014-07-16 13:51:00 -07:00
Roopa Prabhu
1b0b81a23f prefix ethtool attributes with "link-" to be compatible with
native ifupdown + documentation fixes

Ticket: CM-3000
Reviewed By: trivial + doc related
Testing Done: Ran precommit
2014-07-16 12:02:31 -07:00
Roopa Prabhu
522bf8e68b Fix bash completion for sudo users (mostly cosmetic) + man page and
example fixes

Ticket: CM-2911
Reviewed By: CCR-1637
Testing Done: tested ifupdown2 sanity and bash completion

The python argcomplete module that i use for ifupdown2 has a limitation
that it does not work with sudo when used in the global mode. But there is
a workaround for it online (long story short...instead of enabling the global
argparse complete ...the author recommends registering argparse complete bash
completion individually for your script). This patch does just that.

This patch also moves the udev overrides to their respective packages.
Two of them are owned by ifupdown2.

Conflicts:
	rootconf/default/home/cumulus/sysroot-complete
2014-06-10 19:31:50 -07:00
roopa
883f7f83f2 Add examples and script to generate sample interfaces file
Ticket: CM-2643
Reviewed By:
Testing Done: Tested build/install

This also pulls in python-gvgen package from wheezy sid into our
upstream dir. Previously i had packaged the gvgen module directly
into the ifupdown package
2014-05-19 07:00:12 -07:00
roopa
47cd15c473 Update examples file
Ticket: CM-1438
Reviewed By:
Testing Done:
2014-01-30 19:46:52 -08:00
roopa
4716e0e5c9 Some fixes + enhancements
Ticket: CM-1438
Reviewed By:
Testing Done: Tested installing new ifupdown on the box

- fixed a few things in ifquery
- added new perfmode to skip some of the checks (useful during boot when there is
  no previous state)
- updated doc dir with example
- Added README, TODO and KNOWN_ISSUES file
2013-11-10 22:35:40 -08:00