58 Commits

Author SHA1 Message Date
Franco Fichtner
189e3af29e interfaces: improve bridge code a bit
* Allow the bridge to come up without members.  While the GUI made sure
  to avoid empty bridges there is no reason for it and underneath if the
  interface was disabled the GUI made the interface disappear from the
  selection.  So now allow an empty bridge (may be nice for migration)
  and show disabled interfaces in the edit page.  Fix all callers to not
  assume the member property is always set.  Can probably go away once
  bridges are moved to MVC.
* Inline interface_bridge_add_member() since link_interface_to_bridge()
  is the only caller.  Improve the parameter passing a bit too.
* Add bridge interface return code to (_)interfaces_bridge_configure().
* Improve device resolution and a few mwexecf() replacements.
* Log the reason why a device could not be attached to bridge when one
  device is not there as expected.
2023-09-13 10:39:49 +02:00
Franco Fichtner
3c8efbc5f6 interfaces: typo in previous #5637 2022-06-17 09:32:09 +02:00
Franco Fichtner
2862eaf0cc interfaces: for specific device edit pages avoid reloading device again #5637
The device reconfigure is done unconditionally before configuring the attached
interface.  If we use reload we will configure the interface again, but if the
interface is disabled we wouldn't trigger the device creation.  So go back to
the former code which didn't exhibit any real issue before we used $reload.
2022-06-17 09:29:23 +02:00
Franco Fichtner
90f471cb19 interfaces: remove /var/run/booting side effect #5637
interfaces_configure() is unaffected.  While looking at the code
decided to make all callers except newwanip and vxlan hook use
$reload to request a full reconfiguration as that is most likely
what the user would expect in these cases in the first place.
2022-06-14 14:20:12 +02:00
Franco Fichtner
30fa1c056c interfaces: keep boot order but invoke pre and post device hooks always #5540
OpenVPN was put on the "delayed" ("virtual") list in d090ccc3dceb4
but more out of convenience than common sense.  To make sense of it
now check if the assigned device is provided by the plugin system
except for a bridge which is still having a special role in the code.

The role of bridges is somewhat disputed.  We may be able to set them
up earlier detaching them from the older ordering logic but more tests
need to be done in order to pull it off.
2022-02-11 08:49:45 +01:00
Franco Fichtner
268bdb8ab2 interfaces: kill creation side effect for bridges #5540
Ironically, brigdes were the only user of the "&" reference trick
removed from LAGG, GIF, GRE and VLAN.
2022-02-10 10:07:57 +01:00
Franco Fichtner
ff7a0a9d1b interfaces: reduce diff 2022-01-24 08:24:57 +01:00
Ad Schellevis
11b95376d9 Interfaces: Other Types: Bridge : improve validations and fix defaults as described by ifconfig(8) 2022-01-18 18:18:39 +01:00
Franco Fichtner
0d5ef68694 interfaces: sync groups between possible create/destroy operations
Had to tiptope around f2769fe099 which seems useful but counter-
intuitive.  Renaming live groups is a bad concept.

PR: https://github.com/opnsense/core/issues/5189
2021-09-13 14:07:24 +02:00
Ad Schellevis
ee542d2822
add support for additional loopbacks (https://github.com/opnsense/core/issues/3832) (#3840)
Add *Interfaces: Other Types: Loopback*.

-  while here, also add the device name in interfaces.php and support setting an initial description on new interfaces (copy device description if available)

- check usages of lo0 and change to lo if not specific for our default loopback
2019-12-05 13:19:43 +01:00
Franco Fichtner
3498416734 interfaces: in a perfect world these do not need services.inc
Let's make it so.  :)
2019-04-25 09:37:34 +02:00
Franco Fichtner
db2b0ff27c interfaces: allow link-local address on bridges; closes #926 2019-04-25 09:25:40 +02:00
Franco Fichtner
a1d5d74b5a www: everything not "dhcp" for #3218 2019-02-14 15:14:15 +01:00
Ad Schellevis
4a8e737ced fix some gettext() + html_safe, discussed c4c7f8d732 2019-02-03 20:04:08 +01:00
Michael Steenbeek
7ad3d8dff6 Replace some trivial double quotes with single ones 2018-11-23 14:36:44 +01:00
Michael Steenbeek
19ce1c57a4 Replace uncommon <> notation with != 2018-11-23 14:36:44 +01:00
Franco Fichtner
b77b3a5782 interfaces: flip arguments of interface_configure() 2018-05-22 08:42:52 +02:00
Franco Fichtner
e9c3be35d6 www: visual cleanups, unused class/style zapping #2290 2018-03-25 13:10:27 +00:00
NOYB
9d96bdcbc7 Help For - Data For Attribute
Use original element (<div>/<small>) with "data-for" attribute.

The old jquery "for" attribute selectors can be removed once conversion to "data-for" attribute is complete (including plugins).

The old jquery selectors to remove once conversion is complete.
  opnsense_ui.js & head.inc
  $("*[for='" + $(this).attr('id') + "']")....
  $('[for*="help_for"]')....
2018-03-17 16:12:55 +01:00
Ad Schellevis
6b677051d4 bridging, hide already assigned interfaces, closes https://github.com/opnsense/core/issues/2256 2018-03-12 18:45:47 +01:00
NOYB
6ef9a127ff HTML Compliance - Attribute "type" on Element <script>
Warning: The type attribute is unnecessary for JavaScript resources.

HTML5: Edition for Web Authors
http://www.w3.org/TR/2014/REC-html5-20141028/scripting-1.html
The default, which is used if the attribute is absent, is "text/javascript".

The Script element
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type.
2018-01-22 19:13:34 +01:00
NOYB
4a7bcae7af HTML Compliance - Attribute "for" on Element <div>
Error: Attribute "for" not allowed on element "div" at this point.
Attributes for element "div": http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-div-element

HTML attribute reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
The "Output" element: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output

Attributes for element "output": http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-output-element
2018-01-06 10:52:17 +01:00
NOYB
b2f4cfa7c1 HTML Compliance - Attribute "type" on Element <i>
Error: Attribute "type" not allowed on element <i> at this point.
2018-01-05 08:36:26 +01:00
NOYB
76aab5cb52 HTML Compliance - Obsolete table attributes
width, align, valign, cellpadding, cellspacing, border, summary

Error: The width attribute on the table element is obsolete. Use CSS instead.
Error: The align attribute on the table element is obsolete. Use CSS instead.
Error: The valign attribute on the table element is obsolete. Use CSS instead.
Error: The cellpadding attribute on the table element is obsolete. Use CSS instead.
Error: The cellspacing attribute on the table element is obsolete. Use CSS instead.
Error: The border attribute on the table element is obsolete. Use CSS instead.
Error: The summary attribute on the table element is obsolete. Consider describing the structure of the table in a caption element or in a figure element containing the table; or, simplify the structure of the table so that no description is needed.
2018-01-04 18:26:02 +01:00
Franco Fichtner
b0aa1be38d www: more cleanups possible for #1733 2017-07-22 16:52:50 +02:00
Ad Schellevis
69510a5fad legacy ui pages cleanup for https://github.com/opnsense/core/issues/1733 2017-07-22 15:01:26 +02:00
Franco Fichtner
9b694b705d start to hide IPsec and OpenVPN for pluginification 2017-03-11 17:51:54 +01:00
Ad Schellevis
52b95b80c0 (legacy) cancel button behaviour, closes https://github.com/opnsense/core/issues/1099 2016-12-12 21:34:03 +01:00
Franco Fichtner
715b636793 unbound: clean up includes and function usage
o consolidate "unbound_" prefix for unbound.inc for pluginification
o services.inc includes unbound.inc rightfully, a bit like a
  plugin would do in the future, but this also means we can
  zap all requires from top pages, which are entirely spurious.
o get_dns_servers() moves to system.inc because it is used by
  status_interfaces.php
o RIP read_hosts()
2016-11-14 11:28:01 +01:00
Franco Fichtner
152141866b interfaces: url_safe() redirects for #1168 2016-10-09 18:26:39 +02:00
Franco Fichtner
224b5d8247 www: util.inc is provided by guiconfig.inc for #1065 2016-07-22 07:12:21 +02:00
Fabian Franz
07b0b34773 translation 2016-07-16 15:02:15 +02:00
Ad Schellevis
4e3b66c257 zapp pfsense-utils.inc 2016-06-20 16:59:19 +02:00
Ad Schellevis
65aa038255 (legacy) move is_private_ip() to util.inc 2016-06-20 14:33:30 +02:00
Franco Fichtner
ea31c80969 www: more php print issues 2016-06-15 06:32:40 +02:00
Ad Schellevis
0b31dc522f add opnsense_standard_table_form class to forms 2016-05-20 17:09:58 +02:00
Franco Fichtner
571bdae6ee interfaces: allow bridges with one interface for #61 2016-04-27 20:28:58 +02:00
Ad Schellevis
67b827a84f html correction 2016-03-04 12:07:12 +01:00
Ad Schellevis
2ed6e9b179 (legacy) fix for PHP Warning: in_array() expects parameter 2 to be array, null given in /usr/local/www/interfaces_bridge_edit.php on line 605 2016-02-02 11:47:56 +01:00
Ad Schellevis
0bc35548aa (legacy) refactor interfaces_bridge_edit.php 2015-12-31 15:40:56 +01:00
Franco Fichtner
86d50f8793 www: remove the need for manual $pgtitle #461 2015-12-08 19:45:59 +01:00
Franco Fichtner
1b03f583a7 www: transform $input_error strings to gettext()
Spotted by: @fabianfrz
2015-11-07 21:52:56 +01:00
Franco Fichtner
98a0662d07 interfaces: zap legacy shortcuts 2015-10-15 00:04:12 +02:00
Franco Fichtner
1fcd3fc161 src: whitespace and style sweep 2015-08-14 09:18:14 +02:00
Ad Schellevis
e556c306b7 (legacy) fix dependencies, related to crashreport "PHP Fatal error: Call to undefined function services_dnsmasq_configure() in /usr/local/etc/inc/interfaces.inc on line 3098" 2015-08-12 06:52:26 +00:00
Ad Schellevis
bf573b51fd (legacy) fix crash report "PHP Warning: explode() expects parameter 2 to be string, array given in /usr/local/www/interfaces_bridge_edit.php on line 290" 2015-08-12 06:43:23 +00:00
Ad Schellevis
020ce673cd (legacy) more dependency cleanups 2015-07-23 09:45:57 +00:00
Ad Schellevis
4075a285eb (legacy) move openvpn.inc out of interfaces.inc 2015-07-23 08:27:56 +00:00
Ad Schellevis
ea5dd43a31 (legacy) move pfsense-utils.inc dependency 2015-07-22 15:09:18 +00:00
Ad Schellevis
cbcf5927ca (legacy) more dependency moves, slowly pouring functions.inc empty.... 2015-07-22 13:08:05 +00:00