shell bypass 403

Cubjrnet7 Shell


name : dhcp.cpython-39.pyc
a

'�Dg֏�@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddl
mZddlmZmZmZmZmZmZddlZddlmZmZmZddlmZmZe�e�Z dZ!d	Z"d
Z#dZ$Gdd
�d
e%�Z&Gdd�de&�Z'Gdd�de&�Z(Gdd�de&�Z)d%ee*efd�dd�Z+dd�Z,d&dd�Z-d'dd�Z.Gdd�dej/�Z0Gdd �d e0�Z1Gd!d"�d"e0�Z2Gd#d$�d$e0�Z3e2e1e3gZ4dS)(�N)�suppress)�StringIO)�TimeoutExpired)�Any�Callable�Dict�List�Optional�Tuple)�subp�
temp_utils�util)�get_interface_mac�is_ib_interfacez/run/systemd/netif/leasesz/var/lib/dhclientz.+\.leases?$aN#!/bin/sh
log() {
    echo "udhcpc[$PPID]" "$interface: $2"
}
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
case $1 in
    bound|renew)
    cat <<JSON > "$LEASE_FILE"
{
    "interface": "$interface",
    "fixed-address": "$ip",
    "subnet-mask": "$subnet",
    "routers": "${router%% *}",
    "static_routes" : "${staticroutes}"
}
JSON
    ;;
    deconfig)
    log err "Not supported"
    exit 1
    ;;
    leasefail | nak)
    log err "configuration failed: $1: $message"
    exit 1
    ;;
    *)
    echo "$0: Unknown udhcpc command: $1" >&2
    exit 1
    ;;
esac
c@seZdZdZdS)�NoDHCPLeaseErrorz'Raised when unable to get a DHCP lease.N��__name__�
__module__�__qualname__�__doc__�rr�6/usr/lib/python3.9/site-packages/cloudinit/net/dhcp.pyrAsrc@seZdZdZdS)�InvalidDHCPLeaseFileErrorz�Raised when parsing an empty or invalid dhclient.lease file.

    Current uses are DataSourceAzure and DataSourceEc2 during ephemeral
    boot to scrape metadata.
    NrrrrrrEsrc@seZdZdZdS)�NoDHCPLeaseInterfaceErrorz7Raised when unable to find a viable interface for DHCP.NrrrrrrMsrc@seZdZdZdS)�NoDHCPLeaseMissingDhclientErrorz$Raised when unable to find dhclient.NrrrrrrQsr��returncCs2|p|j}|dur"t�d�t��|j�|||�S)aPerform dhcp discovery if nic valid and dhclient command exists.

    If the nic is invalid or undiscoverable or dhclient command is not found,
    skip dhcp_discovery and return an empty dict.

    @param nic: Name of the network interface we want to run dhclient on.
    @param dhcp_log_func: A callable accepting the dhclient output and error
        streams.
    @return: A list of dicts representing dhcp options for each lease obtained
        from the dhclient discovery if run, otherwise an empty list is
        returned.
    Nz1Skip dhcp_discovery: Unable to find fallback nic.)Zfallback_interface�LOG�debugrZdhcp_client�dhcp_discovery)�distroZnic�
dhcp_log_func�	interfacerrr�maybe_perform_dhcp_discoveryUs


r#cCsttjt|�dd��S)z�Parse a systemd lease file content as in /run/systemd/netif/leases/

    Parse this (almost) ini style file even though it says:
      # This is private data. Do not parse.

    Simply return a dictionary of key/values.F)Zlist_values)�dict�	configobjZ	ConfigObjr)�contentrrr�networkd_parse_leaselsr'cCsP|durt}i}tj�|�s |St�|�D] }tt�tj�||���||<q*|S)z�Return a dictionary of dictionaries representing each lease
    found in lease_d.i

    The top level key will be the filename, which is typically the ifindex.N)	�NETWORKD_LEASES_DIR�os�path�isdir�listdirr'r
�load_text_file�join)�leases_d�retZlfilerrr�networkd_load_leasesws�
r1cCsF|durt}t|d�}t|���D]\}}|�|�r"||Sq"dS)N)r/)r(r1�sorted�items�get)Zkeynamer/ZleasesZ_ifindex�datarrr�networkd_get_option_from_leases�s

r6c@s�eZdZdZdZdd�Zedd��Zedd��Zee	d	�d
d��Z
ee	d	�dd
��Zej
e	ee	efd�dd��Zeej
e	eee	e	fd�dd���Zej
de	eeee	efd�dd��ZdS)�
DhcpClient��
cCst�|j�|_|jst��dS�N)r�which�client_name�dhcp_client_pathr��selfrrr�__init__�szDhcpClient.__init__cCstjd|jgddgd�dS)NZpkillr��Zrcs)rr<)�clsrrr�kill_dhcp_client�szDhcpClient.kill_dhcp_clientcCs*|��t�d�}|D]}t�|�qdS)Nz/var/lib/dhcp/*)rD�globr)�remove)rC�files�filerrr�clear_leases�s
zDhcpClient.clear_leases)�dhcp_interfacecCs|jd|j|ddgd�dS)N�startrrArB�Zmanage_servicer<�rCrJr rrr�
start_service�s�zDhcpClient.start_servicecCs|jd|jddgd�dS)N�stoprrArBrLrMrrr�stop_service�szDhcpClient.stop_service�r"rcCsiS)z�Get the most recent lease from the ephemeral phase as a dict.

        Return a dict of dhcp options. The dict contains key value
        pairs from the most recent lease.
        r�r?r"rrr�get_newest_lease�szDhcpClient.get_newest_lease��routesrcCsgS)ap
        parse classless static routes from string

        The tuple is composed of the network_address (including net length) and
        gateway for a parsed static route.

        @param routes: string containing classless static routes
        @returns: list of tuple(str, str) for all valid parsed routes until the
                  first parsing error.
        r)rUrrr�parse_static_routes�s
zDhcpClient.parse_static_routesN�r"r!rcCsiS)a�Run dhcp client on the interface without scripts or filesystem
        artifacts.

        @param interface: Name of the network interface on which to send a
            dhcp request
        @param dhcp_log_func: A callable accepting the client output and
            error streams.
        @param distro: a distro object for network interface manipulation
        @return: dict of lease options representing the most recent dhcp lease
            parsed from the dhclient.lease file
        r)r?r"r!r rrrr�szDhcpClient.dhcp_discovery)NN)rrrr<�timeoutr@�classmethodrDrI�strrNrP�abc�abstractmethodrrrS�staticmethodrr
rVr	rrrrrrr7�s0

 
�
�r7cs�eZdZdZ�fdd�Zeeeeee	fd�dd��Z
edd��Zeeee	fd	�d
d�Zdee
eeee	fd
�dd�Zeeeeeefd�dd��Zee
ed�dd��Zed�dd�Z�ZS)�IscDhclientZdhclientcst���d|_dS)Nz/run/dhclient.lease��superr@�
lease_filer>��	__class__rrr@�s
zIscDhclient.__init__)�
lease_contentrcCs�t�dtj�}g}t|�dkr"gS|�|�D]t}g}|�d�D]2}|���dd��dd�}|r>|�|�dd��q>t	|�}|�
d	�}|r�t�|�|d	<|�|�q,|S)
z�parse the content of a lease file

        @param lease_content: a string containing the contents of an
            isc-dhclient lease
        @return: a list of leases, most recent last
        zlease {(?P<lease>.*?)}\nr�;�"r8zoption � rA�unknown-245)
�re�compile�DOTALL�len�findall�split�strip�replace�appendr$r4r^�get_ip_from_lease_value)rdZlease_regex�dhcp_leases�leaseZ
lease_options�line�options�opt_245rrr�parse_leases�s$
�zIscDhclient.parse_leasescCsx|�dd�}t|�dkrdd}|�d�D] }t|�dkr>d|}||7}q&t�dt|�dd�d��}n
|�d	�}t�|�S)
N�\r8��:rA�0z>L�zutf-8)	rprlrn�struct�pack�int�encode�socket�	inet_ntoa)Zfallback_lease_valueZunescaped_valueZ
hex_stringZhex_pairZpacked_bytesrrrrrs
�
z#IscDhclient.get_ip_from_lease_valuerQcCs`tt��Dt�|j�}|r>|�|�}|r>|dWd�SWd�n1sR0YiS)a�Get the most recent lease from the ephemeral phase as a dict.

        Return a dict of dhcp options. The dict contains key value
        pairs from the most recent lease.

        @param interface: an interface string - not used in this class, but
            required for function signature compatibility with other classes
            that require a distro object
        @raises: InvalidDHCPLeaseFileError on empty or unparsable leasefile
            content.
        ���N)r�FileNotFoundErrorr
r-rarx)r?r"r&rsrrrrSs

4zIscDhclient.get_newest_leaseNrWc
Cs�t�d|�d}d}d}t|j|�}t|jd�}tt��&t�|�t�|j�Wd�n1sh0Y|j	�
|�t|�r�dt|�dd�}	d||	f}
t
jd	d
�}tj�||d�}t�||
�z$t�|�|j|j|||��\}}
WnDtj�y8}z(t�d|j|j|j�t|�WYd}~n
d}~00tj||jg|dd
�}|�rvt�dd�dd�|D���iSd}d}d}d}t|�D]�}zt�|���}t|�}Wn>t�y�d|�d�}YnXt �y�d|�d�}Yn:0|�!|�}|dk�r$t�d|�t�"|t#j$�d	}�q<t%�&|��q�t�|�|�sRt�'d||d�|du�rf|||
�|�(|�}|�rz|St)��dS)a�Run dhclient on the interface without scripts/filesystem artifacts.

        @param interface: Name of the network interface on which to send a
            dhcp request
        @param dhcp_log_func: A callable accepting the dhclient output and
            error streams.
        @param distro: a distro object for network interface manipulation
        @return: dict of lease options representing the most recent dhcp lease
            parsed from the dhclient.lease file
        �!Performing a dhcp discovery on %sz/run/dhclient.pidN�{�G�z�?�z20:%s�$z0interface "%s" {send dhcp-client-identifier %s;}T�Z	needs_exez-dhclient.confz3dhclient exited with code: %s stderr: %r stdout: %r)�maxwaitZnaplenz+dhclient did not produce expected files: %sz, css|]}tj�|�VqdSr:)r)r*�basename)�.0�frrr�	<genexpr>}�z-IscDhclient.dhcp_discovery.<locals>.<genexpr>�unknownFr8�No PID file found at z, dhclient is still running�PID file contained [z], dhclient is still runningrAzkilling dhclient with pid=%szCdhclient(pid=%s, parentpid=%s) failed to daemonize after %s secondsg$@)*rrr�rXrr�r)rFra�net_ops�link_uprrr�get_tmp_ancestorr*r.r
�
write_filerZbuild_dhclient_cmdr=�ProcessExecutionError�	exit_code�stderr�stdoutrZwait_for_files�warning�ranger-ro�
ValueErrorZ
get_proc_ppid�kill�signal�SIGKILL�time�sleep�errorrSr)r?r"r!r �pid_fileZconfig_file�
sleep_time�sleep_cyclesr�Zdhcp_client_identifierZinterface_dhclient_content�tmp_dir�out�errr��missingZppidZ
daemonized�pid_content�	debug_msg�_�pidrtrrrr&s�

*�����	�	��
�
�


�


zIscDhclient.dhcp_discoveryrTcsB|�d��dd�t�d��D�}g}d�vr:dd�|D�}�fdd�}d	}t|�D�]�\}}||krfqRt|�}|td
d�vr�d}t||d
��|kr�|||t||d
���|Sd�||d|d��}	d�||d||��}
||}�n2|tdd
�v�r�d}t||d
��|k�r>|||t||d
���|Sd�||d|d�dg�}	d�||d||��}
||}�n�|tdd�v�rd}t||d
��|k�r�|||t||d
���|Sd�||d|d�ddg�}	d�||d||��}
||}�n|tdd�v�r�d}t||d
��|k�r`|||t||d
���|Sd�||d|d�gd��}	d�||d||��}
||}n�|d	k�rd}t||d
��|k�r�|||t||d
���|Sd}	d�||d||��}
||}nt�	d|�|S|�
d|	|f|
f�qR|S)a(
        parse rfc3442 format and return a list containing tuple of strings.

        The tuple is composed of the network_address (including net length) and
        gateway for a parsed static route.  It can parse two formats of
        rfc3442, one from dhcpcd and one from dhclient (isc).

        @param rfc3442: string in rfc3442 format (isc or dhcpd)
        @returns: list of tuple(str, str) for all valid parsed routes until the
            first parsing error.

        e.g.:

        sr=parse_static_routes(        "32,169,254,169,254,130,56,248,255,0,130,56,240,1")
        sr=[
            ("169.254.169.254/32", "130.56.248.255"),         ("0.0.0.0/0", "130.56.240.1")
        ]

        sr2 = parse_static_routes(        "24.191.168.128 192.168.128.1,0 192.168.128.1")
        sr2 = [
            ("191.168.128.0/24", "192.168.128.1"),        ("0.0.0.0/0", "192.168.128.1")
        ]

        # unknown-121 option format
        sr3 = parse_static_routes(        "0:a:0:0:1:20:a8:3f:81:10:a:0:0:1:20:a9:fe:a9:fe:a:0:0:1")
        sr3 = [
            ("0.0.0.0/0", "10.0.0.1"),
            ("168.63.129.16/32", "10.0.0.1"),
            ("169.254.169.254/32", "10.0.0.1"),
        ]

        Python version of isc-dhclient's hooks:
           /etc/dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes
        recSsg|]}|r|�qSrr�r��tokrrr�
<listcomp>�r�z3IscDhclient.parse_static_routes.<locals>.<listcomp>z[, . :]r{cSsg|]}tt|d���qS)r})rZr�r�rrrr��r�csd|||�f}t�|�dS)Nz�RFC3442 string malformed.  Current route has CIDR of %s and requires %s significant octets, but only %s remain. Verify DHCP rfc3442-classless-static-routes value: %s)rr�)Zcidr�requiredZremain�msg�Zrfc3442rr�_trunc_error�s

��z5IscDhclient.parse_static_routes.<locals>._trunc_errorr��!�	N�.rA���rzr|���r�)r|r|r|z0.0.0.0zSParsed invalid net length "%s".  Verify DHCP rfc3442-classless-static-routes value.z%s/%s)�rstriprirn�	enumerater�r�rlr.rr�rq)rU�tokens�
static_routesr�Zcurrent_idx�idxr�Z
net_lengthZreq_toksZnet_addressZgatewayrr�rrV�s|*
	 "�


��zIscDhclient.parse_static_routesrc		Cs�d}|j|jfttffD]�\}}|s&qg}zt�|�}WntyNYqYn0d}|D]<}t�||�sjqXtj	�
||�}tj	�|�}||krX|}|}qX|r|SqdS)z�Get the latest lease file from a distro-managed dhclient

        Doesn't consider the ephemeral timeframe lease.

        @param distro: used for distro-specific lease location and filename
        @return: The most recent lease file, or None
        Ng�)Zdhclient_lease_directoryZdhclient_lease_file_regex�DHCLIENT_FALLBACK_LEASE_DIR�DHCLIENT_FALLBACK_LEASE_REGEXr)r,r�ri�searchr*r.�getmtime)	r Zlatest_fileZ	directoryZregexZlease_filesZlatest_mtime�fnameZabs_path�mtimerrr�!get_newest_lease_file_from_distro%s2	��

z-IscDhclient.get_newest_lease_file_from_distro)�keycCsJ|�|�}|rFt�|�}|rFt|�|��D]}|�|�}|r*|Sq*dS)a8Get a key from the latest lease from distro-managed dhclient

        Doesn't consider the ephemeral timeframe lease.

        @param lease_dir: distro-specific lease to check
        @param lease_file_regex: distro-specific regex to match lease name
        @return: The most recent lease file, or None
        N)r�r
r-�reversedrxr4)r?r r�rar&rtZserverrrr�get_key_from_latest_leaseQs	


z%IscDhclient.get_key_from_latest_lease)NN)rrrr<r@r]rZrrrrxrrrSr	rrr
rVr�r��
__classcell__rrrbrr^�s(
�
�w+r^c@s�eZdZdZdZdeeeeee	fd�dd�Z
eee
eed�dd	��Zeeeed
�dd��Zeeee	fd
�dd�Zeeeeeefd�dd��ZdS)�DhcpcdZdhcpcdi,NrWc
Cs.t�d|�d}t|j|�}g}|j�|��ztt|�r@dg}|jdddddg|�|�}tj||jd	�\}}	|d
ur�|||	�|�	|�}
|
�r�t�g|�d��j
��}d
}d}
d
}t|�D]�}zNt
�|���}t|�}|�|�}
|
�rt�d||
�t�|
tj�W�q�Wndt�y6t�d|
�Y�q�YnHt�yTd|�d�}Yn*t�yrd|�d�}Yn0|
WSt�|�q�t�|�|
WStd��Wn�t�y�}z(t�d|j|j|j
�t|�WYd
}~nLd
}~0tj�y(}z(t�d|j|j|j
�t|�WYd
}~n
d
}~00d
S)a�Run dhcpcd on the interface without scripts/filesystem artifacts.

        @param interface: Name of the network interface on which to send a
            dhcp request
        @param dhcp_log_func: A callable accepting the client output and
            error streams.
        @param distro: a distro object for network interface manipulation
        @return: dict of lease options representing the most recent dhcp lease
            parsed from the dhclient.lease file
        r�r�z
--clientid�
--ipv4onlyz--waitipz--persistentz--noarpz--script=/bin/true)rXNz-PFr8z!killing dhcpcd with pid=%s gid=%sz9Process group id [%s] has already exited, nothing to killr�z, dhcpcd is still runningr�z], dhcpcd is still runningzNo lease foundz8dhcpcd timed out after %s seconds: stderr: %r stdout: %r�1dhcpcd exited with code: %s stderr: %r stdout: %r)rrr�rXr�r�rr<rrSr�ror�r
r-Z
get_proc_pgidr)�killpgr�r��ProcessLookupErrorr�r�r�r�rrr�r�r�)r?r"r!r r�r�Zinfiniband_argumentZcommandr�r�rtr�r��gidr�r�r�r�rrrrhs����
�



��
�
�

��zDhcpcd.dhcp_discovery)r5�dhcp_option_numberrcCs<d}ttd�dd�}|||�D]\}}||kr|SqdS)aVget a specific option from a binary lease file

        This is required until upstream dhcpcd supports unknown option 245
        upstream bug: https://github.com/NetworkConfiguration/dhcpcd/issues/282

        @param data: Binary lease data
        @param number: Option number to return
        @return: the option (bytes) or None
        ��)r5�indexcssXt|�|dkrT||}|d|}|d|d||�}||fVd||}qdS)z�options are variable length, and consist of the following format

            option number: 1 byte
            option length: 1 byte
            option data: variable length (see length field)
            r�rAN)rl)r5r��code�length�optionrrr�iter_options�s
z>Dhcpcd.parse_unknown_options_from_packet.<locals>.iter_optionsN)�bytesr�)r5r�ZINDEXr�r�r�rrr�!parse_unknown_options_from_packet�s
z(Dhcpcd.parse_unknown_options_from_packet)�
lease_dumpr"rc

Cst�d||�zHtdd�|���dd��d�D��}|sTd}t�||�t||��Wn6ty�}zt�d|�t|�WYd	}~n
d	}~00||d
<dd�|�	�D�}d
dd�}|�	�D]\}}||vr�|�
|�||<q�t�d|�d��}t
�|d�}	|	�rt�|	�|d<|S)a`parse the output of dhcpcd --dump

        map names to the datastructure we create from dhclient

        example dhcpcd output:

        broadcast_address='192.168.15.255'
        dhcp_lease_time='3600'
        dhcp_message_type='5'
        dhcp_server_identifier='192.168.0.1'
        domain_name='us-east-2.compute.internal'
        domain_name_servers='192.168.0.2'
        host_name='ip-192-168-0-212'
        interface_mtu='9001'
        ip_address='192.168.0.212'
        network_number='192.168.0.0'
        routers='192.168.0.1'
        subnet_cidr='20'
        subnet_mask='255.255.240.0'
        z)Parsing dhcpcd lease for interface %s: %rcSs"g|]}d|vr|jddd��qS)�=rA)�maxsplit)rn)r��arrrr�(s�z-Dhcpcd.parse_dhcpcd_lease.<locals>.<listcomp>�'r8�
z;No valid DHCP lease configuration found in dhcpcd lease: %rzError parsing dhcpcd lease: %rNr"cSsi|]\}}|�dd�|�qS)r��-)rp)r�r��valuerrr�
<dictcomp>=r�z-Dhcpcd.parse_dhcpcd_lease.<locals>.<dictcomp>z
fixed-addressr�)z
ip-addresszclassless-static-routesz/var/lib/dhcpcd/z.lease�rh)rrr$rorprnr�rr�r3�popr
Zload_binary_filer�r�r�r�)
r�r"rtr�r�Zname_map�sourceZdestinationZdhcp_messagerwrrr�parse_dhcpcd_leases@����	�
�zDhcpcd.parse_dhcpcd_leaserQc
Cshz |�t�|jdd|g�j|�WStjyb}z(t�d|j|j|j�t	|�WYd}~n
d}~00dS)z�Return a dict of dhcp options.

        @param interface: which interface to dump the lease from
        @raises: InvalidDHCPLeaseFileError on empty or unparsable leasefile
            content.
        z--dumpleaser�r�N)
r�rr<r�r�rrr�r�r)r?r"r�rrrrSTs&����zDhcpcd.get_newest_leaserTcCsD|��}|r4dd�t|ddd�|ddd��D�St�d|�gS)a�
        classless static routes as returned from dhcpcd --dumplease and return
        a list containing tuple of strings.

        The tuple is composed of the network_address (including net length) and
        gateway for a parsed static route.

        @param routes: string containing classless static routes
        @returns: list of tuple(str, str) for all valid parsed routes until the
                  first parsing error.

        e.g.:

        sr=parse_static_routes(
            "0.0.0.0/0 10.0.0.1 168.63.129.16/32 10.0.0.1"
        )
        sr=[
            ("0.0.0.0/0", "10.0.0.1"),
            ("169.63.129.16/32", "10.0.0.1"),
        ]
        cSsg|]}|�qSrr�r��irrrr��r�z.Dhcpcd.parse_static_routes.<locals>.<listcomp>Nr�rAz'Malformed classless static routes: [%s])rn�ziprr��rUr�rrrrVqs
(zDhcpcd.parse_static_routes)NN)rrrr<rXrZr	rrrrr]r�r�r�r�rSrr
rVrrrrr�ds$�
�w�+Hr�csxeZdZdZ�fdd�Zdeeeeee	fd�dd�Z
eeee	fd�d	d
�Zeee
eeefd�dd
��Z�ZS)�UdhcpcZudhcpccst���d|_dS)Nr8r_r>rbrrr@�s
zUdhcpc.__init__NrWc
CsVt�d|�tjdd�}tj�||d�|_tt	��t�
|j�Wd�n1sV0Y|j�|�tj�|d�}t
�|td�|jdd	d
|d|dd
ddg}t|�r�|�dd�t|�dd��dd��g�ztj|d|jidd�\}}WnDtj�y6}	z(t�d|	j|	j|	j�t|	�WYd}	~	n
d}	~	00|du�rL|||�|�|�S)arRun udhcpc on the interface without scripts or filesystem artifacts.

        @param interface: Name of the network interface on which to run udhcpc.
        @param dhcp_log_func: A callable accepting the udhcpc output and
            error streams.
        @return: A list of dicts of representing the dhcp leases parsed from
            the udhcpc lease file.
        r�Tr�z.lease.jsonN�
udhcpc_scripti�z-OZstaticroutesz-iz-sz-nz-qz-fz-vz-xz	0x3d:20{}r�r{r8Z
LEASE_FILE)Z
update_envZcapturez1udhcpc exited with code: %s stderr: %r stdout: %r)rrrr�r)r*r.rarr�rFr�r�r
r��
UDHCPC_SCRIPTr<r�extend�formatrrprr�r�r�r�rrS)
r?r"r!r r�r��cmdr�r�r�rrrr�sV
*������

zUdhcpc.dhcp_discoveryrQcCst�t�|j��S)a�Get the most recent lease from the ephemeral phase as a dict.

        Return a dict of dhcp options. The dict contains key value
        pairs from the most recent lease.

        @param interface: an interface name - not used in this class, but
            required for function signature compatibility with other classes
            that require a distro object
        @raises: InvalidDHCPLeaseFileError on empty or unparsable leasefile
            content.
        )r
Z	load_jsonr-rarRrrrrS�szUdhcpc.get_newest_leaserTcCs8|��}|r4dd�t|ddd�|ddd��D�SgS)NcSsg|]}|�qSrrr�rrrr��r�z.Udhcpc.parse_static_routes.<locals>.<listcomp>r�rA)rnr�r�rrrrV�s(zUdhcpc.parse_static_routes)NN)rrrr<r@rZr	rrrrrSr]rr
rVr�rrrbrr��s�
�Hr�)NN)N)N)5r[rEZloggingr)rir�r�r~r��
contextlibr�ior�
subprocessr�typingrrrrr	r
r%Z	cloudinitrrr
Z
cloudinit.netrrZ	getLoggerrrr(r�r�r��	ExceptionrrrrrZr#r'r1r6�ABCr7r^r�r�ZALL_DHCP_CLIENTSrrrr�<module>sR 
!�
�


K.f

© 2025 Cubjrnet7