Commit Graph

57 Commits

Author SHA1 Message Date
Michael Tremer
e4cc1eefd5 dhcp.cgi: Call the unbound-dhcp-leases-client for all events
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-05-10 16:07:05 +01:00
Adolf Belka
60a050768f dhcp.cgi: Fixes bug#11774 - allows dhcp option of array of integer 8
- This v2 version is to correct the bug number. I entered a wronn bug number in the first
   version
- This extends the allowed options from just array of ip-address to also include
   integer 8 or integer 16 or integer 32.
- Tested out on vm testbed. The array of integer 8 (or 16 or 32) is acceptewd by the dhcp
   options section. I am not able to test out that the function actually works as I don't
   have any dhcp situation set up to use that capability.
- Records or array of records is still not included. It was only an expansion of the array
   of section to include integers.

Fixes: bug#11774
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-02-28 16:29:27 +00:00
Adolf Belka
f16eeae078 dhcp.cgi: Adjust legend entries to make clear they are legends and not messages
- A new IPFire user on the forum saw the orange and red coloured blocks in the legend
   section and believed that they were messages about problems that had been created with
   the fixed leases.
- This change puts a small block with seperate explanatory text for both the orange and
   red coloured blocks.
- This change will also be applied to the wiki in a much clearer way

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2024-01-03 21:02:19 +00:00
Adolf Belka
dcb878d6a1 dhcp.cgi: Adjust spacing between an icon and explanatory text
- When dealing with a problem on the forum I noticed that in the Fixed Leases table
   Legend section there was a very large space between the empty checkbox icon and the
   explanatory text. It looks like the &nbsp that I have removed worked on the text
   section 'click to enable' as that was moved but not on the off.gif icon as that stayed
   in its original place leaving a very large space between the icon and the explanatory
   text. Removing the two &nbsp; commands fixes that.
- Reading up about &nbsp the problem might be related to these tags no longer being
   recommended to use with the newer HTML versions and that indenting or spacing should be
   done via CSS code. Will have a look in future on how to accomplish this via CSS.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2024-01-03 21:02:19 +00:00
Peter Müller
70d8e3be30 Revert "dhcp.cgi: Add column with resolved hostname by IP address"
This reverts commit ee556e820f.

See https://lists.ipfire.org/hyperkitty/list/development@lists.ipfire.org/message/QNCXBVG7CNENG4YTSRXXDQCB52E7FEW7/
2023-11-24 13:37:24 +00:00
Peter Müller
74eb1c9539 dhcp.cgi: Update file header
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-11-24 13:22:42 +00:00
Sebastien GISLAIN
ee556e820f dhcp.cgi: Add column with resolved hostname by IP address
In web interface, on page DHCP Server, in table Current fixed leases, add column with resolved hostname by IP address
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2023-11-24 13:22:03 +00:00
Adolf Belka
d3aec71828 dhcp.cgi: Update to naming of variables in css section
- After looking at other .cgi files I realised that I had named the variables based on
   their dhcp usage only. However colouryellow or color20 etc can be used not only in a
   row but also in a cell or a column. Rather than ending up with multiple copies of the
   same colour for rows, cells, columns etc I have simplified the variable names to just
   the colour. They can then be used in whatever situation is wanted. The rest of the cgi
   code will give the view of what structure the colour is being applied to.
- This will limit the number of different css variables defined in the header.pl file

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:30:39 +00:00
Adolf Belka
b52a84ddc7 dhcp.cgi: Fix bug#10629 - Highlight fixed IP's in dynamic range in red
- This v2 patch has moved the extraHead variable into header.pl
- This patch marks all IP's that are in the Fixed list but are also in the dynamic range
   that has been defined, in red.
- Additional function created to check if an ip address is in a defined range.
- Added an additional key item under the Fixed Leases table for Fixed IP in dynamic range
- Added line to English Language file for this key item.
- ./make lang run before commit.
- Tested in vm testbed and confirmed that any ip address in the Fixed Leases table that
   is in the defined dynamic range is highlighted in red
- This uses the css background-color appoach from the first patch in this set.
- This patch only highlights those IP's that overlap in red but does nothing more. So a
   user can still create new ones if they want but they will all show up in red.
- This patch flags up if people are doing things that they shouldn't be doing but allows
   them to continue doing so without changing anything if they don't want to and so will
   not break existing setups.

Fixes: Bug#10629
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
2023-03-04 13:41:21 +00:00
Adolf Belka
de4dea96aa dhcp.cgi: Fix for bug#10629 - update bgcolor to css
- This v2 version moves the extraHead variable to header.pl as many of the css values
   will be used in many other WUI cgi pages so makes sense to not define anew in every
   location using the bgcolor or other colour variables.
- I will submit patches to follow the same approach in all other WUI cgi pages once this
   has been submitted into next
- bgcolor was deprecated in HTML 4.01 and is not supported by HTML 5
- The orange colour for IP's that are outside the IPFire green and blue subnets does not
   work on any browser I am using.
- I used the CSS approach that @Leo used in the Zone Configuration cgi page
- This patch changes all existing bgcolor entries to the css based background-color
- Tested on my vm testbed and confirmed to work. The Orange colour for IP's outside of
   the subnet now shows up.

Fixes: Bug#10629
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
2023-03-04 13:41:21 +00:00
Adolf Belka
31016a38e6 dhcp.cgi: Add domain-list type info in dhcp options - bug#12819
Fixes: bug#12819
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-04-04 20:09:41 +00:00
Peter Müller
66c3619872 Early spring clean: Remove trailing whitespaces, and correct licence headers
Bumping across one of our scripts with very long trailing whitespaces, I
thought it might be a good idea to clean these up. Doing so, some
missing or inconsistent licence headers were fixed.

There is no need in shipping all these files en bloc, as their
functionality won't change.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-18 23:54:57 +00:00
Stefan Schantl
5410fcbc45 dhcp.cgi: Fix typo and displaying advanced options syntax.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-06-17 20:11:37 +00:00
Stefan Schantl
2bbf176619 dhcp.cgi: Use perl built-in grep
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-06-10 14:30:54 +01:00
Michael Tremer
dfdf076d71 dhcp.cgi: Use new system methods
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-06-10 14:30:52 +01:00
Adolf Belka
6fcd779c05 dhcp.cgi: Bug 10400 - Add Additional DHCP Options - change default
- Make the default that Additional DHCP options Enabled checkbox is
   checked when entering a new option.
- For existing options the Enabled checkbox status is honoured.

Fixes: #10400
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-20 09:45:20 +00:00
Jonatan Schlag
8186b37230 Hardcode theme to ipfire
This disables the theme support and makes it impossible to use any other
themes than the ipfire default theme.

The only intention of this patch is to hardcode the theme to ipfire.
To change any cgi we have is an ugly way, but the only way to do this
fast. The colour handling needs certainly to be improved as well, but
this will and should be done in other patches.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:11:34 +00:00
Adolf Belka
896fa74d68 dhcp.cgi: Fix incorrect { placement from patch 3724
- When patch 3724 was created for bug #10743 a curly bracket was placed in the wrong place
This results in the overlap of two if loops meaning that there will be no validity
check carried out on Default Lease Time if Deny Known Clients is not checked.
- This patch moves the { bracket to the right location.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-02-16 15:02:33 +00:00
Adolf Belka
9dbf3c4936 Fix for bug 10743
This adds in the option to have "deny known clients" in dhcpd.conf
This is applied to the range command so applies to the dynamic addresses
given.
If you have just a range statement say in blue then if you are not using
vlans you could have the situation where a known host in green might end
up getting a lease from the blue range. Here a deny known-clients makes
sense. Your range in this case would be limited to only unknown clients if
deny known-clients was selected.
dhcp WUI has been modified to add in this command. Error message has been
added to check that a range has been specified if the deny unknown clients
checkbox has been selected.
Language files updated with additional items (English, German & Dutch).

For more information on the history of this please see the bugzilla entry
Signed-off-by: Adolf Belka <ahb.ipfire@gmail.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-21 16:48:01 +00:00
Peter Müller
2dfbb338e1 dhcp.cgi: avoid unnecessary line break
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-03-21 16:11:25 +00:00
Arne Fitzenreiter
2de0f49f8f dhcp.cgi: fix typo
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-08-18 17:59:49 +02:00
Arne Fitzenreiter
5653e55107 perl-scripts: suppress smartmatch experimental warning
smartmatch was introduced with perl 5.10 and was marked
as experimental in 5.14

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-08-16 12:21:26 +02:00
Bernhard Bitsch
e4f9ea3c16 dhcp.cgi: Save fixed leases immediately after addition of a new lease
This changes the behaviour of the script to immediately save the added
lease to file but still remain in edit mode to make changes.

If the user does not make any changes, the lease is immediately saved
and there is no second click required to write it to file.

This a more natural flow that is expected by almost all users of this
feature.

Fixes: #12050
Signed-off-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-06-05 00:30:19 +01:00
Michael Tremer
31672dc8bd DHCP: Fix error when editing a newly added fixed lease
They key was remembered but then the array was sorted which resulted
the key showing a wrong line.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-26 16:33:46 +00:00
Michael Tremer
4eb23a9198 DHCP: Restart server in background
This allows for the CGI to return quicker.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-26 10:18:33 +00:00
Michael Tremer
820ab96c69 DHCP: Escape slashes in filename
Fixes: #12006
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-26 10:16:21 +00:00
Michael Tremer
a057a97655 dhcp rfc2136: dhcpd does not seem to support SHA-1
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-10-21 17:34:41 +01:00
Michael Tremer
364452506f Merge remote-tracking branch 'ms/dhcp-rfc2136-broken-down' into next 2015-10-21 13:50:31 +01:00
Lars Schuhmacher
e3edceeb7a Mark required input fields with a star
Mark required input fields with a star as nowadays this is
the de-facto default. Before, it was the other way around and
optional fields were marked.

Signed-off-by: Lars Schumacher <larsen007@web.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-09-21 16:40:41 +01:00
Michael Tremer
e353470a8c dhcp.cgi: Count up key when skippingh search entries
This caused a bug that when the user wanted to edit one
of the static leases and clicked on the edit icon that
an other entry opened up for editing.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-06-17 14:02:05 +02:00
Michael Tremer
a1468f66f0 dhcp.cgi: Never save the search query
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-06-17 14:01:40 +02:00
Michael Tremer
91fc30309f dhcp: Enter edit mode after adding a static lease from list
After a lease has been added from the list of leases it is often
desirable to edit it right away. It appeared that the system
was in edit mode after the lease has been added because the form
had the values of the recently added lease, but hitting the
"Add" button cause an error message that stated that this is
a duplicate entry.

This patch will switch to edit more where the user can change
the values and hit "Update". If he or she chooses to ignore
that the entry is still saved.
2015-06-01 15:56:46 +02:00
Michael Tremer
1554e8a3d3 DHCP: Add search box for static leases 2015-05-28 14:49:41 +02:00
Michael Tremer
5fd7e84c49 dhcp-ddns: Set TTL to 1 minute 2015-03-31 01:23:35 +02:00
Michael Tremer
28fee67640 dnsmasq: Disable parsing leases when DNS Update is enabled 2015-03-16 01:11:29 +01:00
Stefan Schantl
b510e12ac1 DHCP: Allow DNS Update configuration in the web user interface 2015-03-16 00:54:20 +01:00
Michael Tremer
f5fb9a0466 DHCP: Allow using external name servers for leases
These changes allow a user to use RFC2136 in order to
update their (public) DNS zone with the dynamic or
static leases.

A TSIG key may optionally be used to authenticate
the updates.
2015-03-15 13:34:02 +01:00
Alexander Marx
e084eea001 LAyout changes dhcp.cgi 2014-01-09 14:51:19 +01:00
Alexander Marx
52ca3c8093 fifteen-theme: made tables in dhcp-server themeable 2014-01-07 10:22:22 +01:00
Michael Tremer
55b2f2eb09 dhcp: Oops, this version of dhcpd is very strict. 2010-07-21 19:01:44 +02:00
Michael Tremer
3bd3aa727f dhcp: Create local configuration file. 2010-07-21 17:50:04 +02:00
Arne Fitzenreiter
95a392d5f5 Removed dhcp iprange blop (this field can be empty) 2008-09-21 00:29:05 +02:00
ms
70df830214 Ein Paar Dateien fuer die GPLv3 angepasst.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@853 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-08-29 13:25:32 +00:00
maniacikarus
70db86838b ARP Tabelle aus der DHCP CGI entfernt
Pakfire CGI nochmal korrigiert
SSH Zugriff mit Timer gebaut


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@780 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-08-18 19:10:10 +00:00
maniacikarus
cb5e9c6c64 Debuginformationen aus den CGIs entfernt
Hoffentlich die letzten Config Types bereinigt
Samba und SSHd init Skripte angepasst
Pakfire CGI optisch angepasst


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@779 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-08-17 16:00:01 +00:00
maniacikarus
32ab16debd DHCP Webseite angepasst damit beim speichern auch die rc links gesetzt werden
MPFire um Quick Playlist Funktionen erweitert


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@656 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-07-01 11:50:48 +00:00
maniacikarus
fe6cda9204 Einige CGI Fixes
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@643 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-06-21 18:14:48 +00:00
maniacikarus
541d93f0ec CGI fuer DHCP gefixt und if Skripte zurueckgesetzt
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@622 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-06-10 12:17:52 +00:00
ms
26f58f3d03 Wieso sind denn Amavisd-new und Spamassassin in der ISO gelandet?
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@542 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-05-07 19:51:13 +00:00
ms
6bdd769d60 Clamav-Update
Hardwareinformationen fuer Kudzu hinzugefuegt.
dhcpctrl-Datei erstellt.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@540 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-05-07 17:20:46 +00:00